Im running on a server using PHP5 and trying to do this: When someone goes to mydomain.com/folder they are redirected depending on if they have a referrer. If they have a referer they are taken to mydomain.com/folder/index.php and if they dont they go to mydomain.com/folder/index.html. Im using this code: RewriteCond %{HTTP_REFERER} ^$ RewriteRule test/index.html http://mydomain.com/test/index.php [R,L,NC] But it doesnt seem to be working. It works on a hosting account I own with hostgator but not on this server. Anyone know why?
Remove the L flag, it doesn't work on some hosts And Also try putting RewriteBase / or RewriteBase /folder depending where htaccess is.