I've searched the forums and tried all the examples I could find but for some reason can't get this to work. I have a URL that needs to be 301 redirected because of duplicate content concerns.
http://www.example.edu/academics/degree-programs?q=degree-programs
...should read...
http://www.example.edu/academics/degree-programs
I have tried a number of solutions, here is the code I have currently. This did something similar on a different domain.
RewriteCond %{QUERY_STRING} ^q=degree-programs(.*)$
RewriteRule ^(.*)$ http://www.example.edu/academics/degree-programs$1? [R=301,L]
The thought behind this is that it should find anywhere the q=degree-programs query string appears and redirect it to the URL in rewrite rule. What's going wrong here?
[edited by: jdMorgan at 8:17 pm (utc) on Jul 26, 2010]
[edit reason] example.edu for readability [/edit]