htaccess redirect percentage sign

自古美人都是妖i 提交于 2019-12-10 21:19:32

问题


i've got a problem with a htaccess-redirect and can't figured it out, after searching for nearly a hour. Please help me.

RewriteRule ^yeah$ http://www.domain.de/awesome%123123 [NC,QSA,L,R=301]

So i would like to redirect from: domain.de/yeah to domain.de/awesome%123123

But, the url is going to be cut after the %-sign.

Thanks a lot! I'm going to spend you a beer, if you ever visit Rostock.


回答1:


Have you tried using the RewriteRule flag B

http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_b

RewriteRule ^yeah$ http://www.domain.de/awesome%123123 [B,NC,QSA,L,R=301]



来源:https://stackoverflow.com/questions/9314610/htaccess-redirect-percentage-sign

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!