How to 301 a webpage AND remove the URL parameters ??

Discussion in 'Apache' started by tyler_durden, May 9, 2012.

  1. #1
    Apache and .htaccess files are my weak point, and I have been struggling on how to remove url parameters when 301 directing. Below is the line I'm using and it is directing, but it is keeping the url parameter of the original address.

    RewriteRule ^item-page/all http://www.mysite.com/item-page [R=301,L]


    the above line acts like this:
    http://www.mysite.com/item-page/all?page=2 301's to http://www.mysite.com/item-page?page=2 , but I need it to be http://www.mysite.com/item-page.


    Thanks in advance for any help!
     
    tyler_durden, May 9, 2012 IP