: Can .htaccess 301 redirects work with encoded characters? I have an old site with titles in the URL for SEO, but it has URL encoded characters than transliterated Latin characters. Like %20
I have an old site with titles in the URL for SEO, but it has URL encoded characters than transliterated Latin characters. Like %20 instead of space character and many other non-Latin characters. The site is not in English.
I'm moving the site to a new CMS and it transliterates the titles before puttng them into URL bar (which is nice and I'm happy to have).
I'm writing 301 redirects in my .htaccess and they work if all characters of the title are in Latin (the same in both side).
How can I redirect the old encoded URLs to the new transliterated URLS using .htaccess?
More posts by @Merenda212
1 Comments
Sorted by latest first Latest Oldest Best
It should just work fine provided that the URL is enclosed in double-quotations.
For example, if you have:
Old URL: www.example.com/folder%20name/page%20name.html New URL: www.example.com/folder/page
You can write:
Redirect 301 "/folder/page%20name.html" www.example.com/folder/page
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.