Apache ReWriteEngine throwing 500 Internal Server Error for too many internal redirects... why?!?!?!

Posted by Stephen G on Stack Overflow See other posts from Stack Overflow or by Stephen G
Published on 2011-01-14T03:46:00Z Indexed on 2011/01/14 3:53 UTC
Read the original article Hit count: 266

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!?

© Stack Overflow or respective owner

Related posts about php

Related posts about apache