开发者

htaccess remove all $_GET variables

开发者 https://www.devze.com 2023-04-12 07:14 出处:网络
i have hundreds of crawl errors to links like: http://www.myfakebaseurl.com/education/imgcourse/Course.php?wikiinfa=1&page=5438

i have hundreds of crawl errors to links like:

http://www.myfakebaseurl.com/education/imgcourse/Course.php?wikiinfa=1&page=5438

which i'd like to redirect to:

http://www.myfakebaseurl.com/education/courses.html

RewriteRule ^education/imgcourse/Course.php?(.*)$ http://wwww.myfakebaseurl.com/education/courses.html [R=301,L]

still results 开发者_运维技巧in:

http://www.myfakebaseurl.com/education/courses.html?wikiinfa=1&page=4973

How do i get rid of the all the $_GET variables?


A new given query string will replace the old query string unless the QSA flag is given, so just give an empty query string.

RewriteRule ... http://example.com/foo.php? [L]
0

精彩评论

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

关注公众号