简体   繁体   中英

301 redirect with {~`% characters in url

Trying to apply a 301 redirect to this url "/Qx%40w%2C6M42VAwp3%40Rb%7B~cC4ure%60QWI9" but it's not liking it, i'm guessing because of the horrible url and all the strange characters in it, any ideas?

This is the code I currently have:

redirect 302 /Qx%40w%2C6M42VAwp3%40Rb%7B~cC4ure%60QWI9 /product-tool-case.php

You can do this with mod_rewrite as follows:

RewriteRule ^/Qx%40w%2C6M42VAwp3%40Rb%7B~cC4ure%60QWI9 /product-tool-case.php

I?f you want to continue using mod_alias as above, then you should ensure that the old url is url-decoded. So in the above example try:

redirect 302 /Qx@w,6M42VAwp3@Rb{~cC4ure`QWI9 /product-tool-case.php

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