开发者

htaccess remove all $_GET variables

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜