View Single Post
  #12 (permalink)  
Old 10-15-2008, 04:10 PM
wige's Avatar
wige wige is offline
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,629
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: How do you 301 redirect a dynamic URL (URL with a question mark in it)?

Ok, I have come to realize that the code I gave won't work for the root page of a folder (ie domain.tld/). The following code should work in all cases:

Code:
RewriteCond %{query_string} ref=pislikcs.com
RewriteRule (.*) http://www.example.com/$1? [R=301,L]
__________________
The best way to learn anything, is to question everything.
Reply With Quote