开发者

htaccess redirect remove query string

开发者 https://www.devze.com 2023-02-16 13:56 出处:网络
I am using this 301 redirect currently: redirect 301 /oldurl http://www.domain.com/newurl the problem is I get

I am using this 301 redirect currently:

redirect 301 /oldurl http://www.domain.com/newurl

the problem is I get

http://www.domain.com/newurl?/oldurl

What synt开发者_JAVA百科ax would i use with a RewriteRule instead for each url so I don't get the query string on the end?


Could do with some more details on the values for old and new url, but given the information provided:

RewriteRule ^oldurl$  newurl  [R=301,L]
0

精彩评论

暂无评论...
验证码 换一张
取 消