Apache ReWriteEngine throwing 500 Internal Server Error for too many internal redirects... why?!?!?!
- by Stephen G
I'm trying to implement a new ReWrite rule on my local dev machine. I have 13 rules set up already, and all work fine (even as of this writing). However, for some reason the newest one is throwing me 500 Internal Server Errors.
The ReWrite rule is:
RewriteRule stuff/public_html/vault/mystuff/view/(.*) /stuff/public_html/vault/mystuff/view/index.php?stuff=$1
RewriteRule stuff/public_html/vault/mystuff/view/(.*)/ /stuff/public_html/vault/mystuff/view/index.php?stuff=$1
Checked my apache logs and got this:
[Thu Jan 13 22:07:43 2011] [error] [client ::1] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary., referer: http://localhost:8888/stuff/public_html/vault/mystuff/all/index.php?curr=7
On the script I am trying to redirect to view/index.php?stuff=$1, there is nothing that even remotely resembles a redirect of any kind. I do have a very, very basic session verifier being called at the top of the landing script, which is as follows:
//Start session
session_start();
//Check whether the session variable SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
header("location: ".$root_http."");
exit();
}
However, when I access the page directly, it acts as it should, and there is no redirect. All of my other ReWrite rules and their corresponding landing pages are set up the exact same way.
This is blowing my mind. Any help, PLEASE!?