I am trying to redirect a URL referral from a particular site to an alternate page but find that if the page originally requested is in the browser's cache
it will display instead of my desired alternate. What am I doing wrong?
The relevant part of my .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?peiso.es/.*$ [NC]
# to avoid an "infinite" rewrite loop:
RewriteCond %{REQUEST_URI} !^/stolen.html$
RewriteRule ^(.*)$ /stolen.html [R,L]
If you care to see this in action the offending site is: [
peiso.es ]. (Turn off the awful sound near the bottom of the page.) Click on the golfing photo in the upper left. You should get the warning page saying that the link was unauthorized.
Now go to the page they are trying to show: [
tourdeforce360.com ]. You only need to open it so the html is in cache. Now try the link from peiso again and the hawaiian page shows up, not the redirected "stolen" page.