Forum Moderators: phranque
RewriteRule ^(.*)word(.*)$ http://mysite.com [R=302,L]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?referrersite.com/(.*)word(.*)$ [NC]
RewriteRule \.*$ http://www.mysite.com/2011/10/19/word/ [L]
At one point I had code that slowly went to a wordpress page with a 302 error that read" this page has been permanently moved. click here.
My current code is below but it is giving me an error.
RewriteCond %{HTTP_REFERER} ^http://(www\.)?referrersite.com/(.*)word(.*)$ [NC]
RewriteRule \.*$ http://www.example.com/2011/10/19/word/ [L]
(word1|word2)
word[12]
RewriteCond %{HTTP_REFERER} referrersite
RewriteCond %{HTTP_REFERER} (word1|referrersite name)
RewriteRule blah-blah-blah
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://www\.mysite\.com [NC]
RewriteRule ^(word)$ http://mysite.com/2011/10/19/word/ [R=302,L] RewriteRule (word) http://mysite.com [R=302,L] or something similar, maybe RewriteRule ^(word)$ http://mysite.com [R=302,L] and it worked when I'm redirecting to any site besides my own. I once had it redirecting correctly to a page on my site but did some additional editing and lost that code. The lesson I learned was "if you get a working code, copy it in another file if you are going to continue editing." RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://www\.mysite\.com [NC]
RewriteRule ^(word)$ http://mysite.com/2011/10/19/word/ [R=302,L] RewriteCond %{HTTP_REFERER} \.(aa|bb)/
RewriteCond %{HTTP_REFERER} \b(q\w*|text)(=|%3D)([%\w]*)word1(\+|%2[0B])*word2
RewriteRule blahblah\.html /paintings/refrats/otherblahblah.html [R=301,L]
RewriteCond %{HTTP_REFERER} \.
RewriteCond %{HTTP_REFERER} !^http://www\.mysite\.com [NC]
RewriteRule (word) http://mysite.com/2011/10/19/word/ [R=302,L]
RewriteCond %{HTTP_REFERER} \.
RewriteCond %{HTTP_REFERER} \b(q\w*|text)(=|%3D)([%\w]*)word1(\+|%2[0B])*word2
RewriteRule http://mysite/best-word1-word2-blah http://mysite.com/new-blah-word1 [R=301,L] I find that when I use the code below it loops.
RewriteCond %{HTTP_REFERER} \.
RewriteCond %{HTTP_REFERER} !^http://www\.example\.com [NC]
RewriteRule (word) http://example.com/2011/10/19/word/ [R=302,L]
RewriteRule http://example/best-word1-word2-blah et cetera