Forum Moderators: phranque
For each billing option I offer, I have in a seperate folder, the actual "join" page.
I want all requests coming from outside my site, to the actual join pages, to goto the general join page.
What is the best way to do that?
RewriteCond %{REQUEST_URI} ^/([^/]+)/join\.html$ [NC]
RewriteCond %{HTTP_REFERER} ^$
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/ [NC]
RewriteRule .* http://www.yourdomain.com/join.html [R,L]
Be warned, if a browser does not send the referer header, the visitor will not be able to see any of the join pages other than the one in your root folder... Consider using some server-sided script with cookies, that's more reliable than the referer checking in this particular case.