Myspace Layouts - Web Advertising - Mortgage - Cheap Loan - Fast Loans

PDA

View Full Version : PHP5 and Redirection with .htaccess problem


trigoon
Jan 30th 2008, 3:28 pm
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?

buldozerceto
Jan 30th 2008, 7:10 pm
Remove the L flag, it doesn't work on some hosts
And Also try putting RewriteBase / or RewriteBase /folder depending where htaccess is.