简体   繁体   中英

.htaccess 301 redirect swedish charcters in target URL

I require to write 301 redirect like If URL has /faq then it should redirect to /frågor-svar

I have write redirect rule as

redirect 301 /faq <siteURL>/frågor-svar

Upon testing it redirects to the specified URL but swedish characters that I entered got changed. It seems URL get encoded and it becomes /fr%E5gor-svar/

But In address bar of Browser I need that URL stays as /frågor-svar/ and not as /fr%E5gor-svar/

Thanks in Advance

Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteRule ^faq/?$ frågor-svar [R=301,L,NE]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM