PHP Redirect location with htaccess
- by Wayne
In one of the page I have is where administrators are allowed, however, I use if the session isn't set, the header will redirect them to index.php and that method works.
If I replace index.php with home which is for the htaccess which changes it to index.php but it gives an error in the browser
This works:
if(!isset($_SESSION['MEMBER'])){ header("Location: index.php"); }
This does not work:
if(!isset($_SESSION['MEMBER'])){ header("Location: home"); }
htaccess:
RewriteRule ^home$ index.php
The error in Firefox:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this
address in a way that will never
complete.
This problem can sometimes be caused by disabling or refusing to accept
cookies.
What's wrong with it? How do I get this method to work?