I am attempting to implement a brand new ReWrite rule on my small local dev machine. I've 13 rules setup already, and all sorts of work fine (even while of the writing). However, for whatever reason the latest the first is tossing 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 also 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

Around the script I'm attempting to redirect to seeOrcatalog.perl?thingsEqualsDollar1, there's nothing that even remotely resembles a redirect of any sort. I actually do possess a, very fundamental session verifier being known as towards the top of the landing script, that is the following:

//Start session

 //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."");

However, after i access the page directly, it functions because it should, and there's no redirect. All my other ReWrite rules as well as their corresponding squeeze pages are positioned in the identical way.

This really is coming my thoughts. Any help, PLEASE!?

On suggestion from Marc B I switched on RewriteLog, and emerged with this particular:

::1 - - [13/Jan/2011:23:00:09 --0500] [localhost/sid#807df8][rid#941b38/initial/redir#10] (2) [per-dir /Customers/stepheng/Development/] rewrite stuff/public_html/vault/mystuff/view/index.php -> /stuff/public_html/vault/mystuff/view/index.php?stuff=index.php

::1 - - [13/Jan/2011:23:00:09 --0500] [localhost/sid#807df8][rid#941b38/initial/redir#10] (3) split uri=/stuff/public_html/vault/mystuff/view/index.php?stuff=index.php -> uri=/stuff/public_html/vault/mystuff/view/index.php, args=stuff=index.php

::1 - - [13/Jan/2011:23:00:09 --0500] [localhost/sid#807df8][rid#941b38/initial/redir#10] (3) [per-dir /Customers/stepheng/Development/] using pattern 'stuff/public_html/vault/mystuff/view/(.*)/' to uri '/stuff/public_html/vault/mystuff/view/index.php'

::1 - - [13/Jan/2011:23:00:09 --0500] [localhost/sid#807df8][rid#941b38/initial/redir#10] (1) [per-dir /Customers/stepheng/Development/] internal redirect with /stuff/public_html/vault/mystuff/view/index.php [INTERNAL REDIRECT]

It appears like it's attempting to send the argument ?stuff=index.php, however i aren't seeing how that's possible. Any ideas?

Switch on rewrite logging:

 RewriteLog /path/to/rewritelog.file
 RewriteLogLevel 9

inside your httpd.conf. That'll essentially record EVERYTHING the rewrite engine does, and you will have the ability to begin to see the exact path a URL required with the system, and many likely why it's doing what looks to become an infinite loop

Does not that rewrite rule match it's destination? It is going to loop. You have to add the flags that say stop processing rewrite rules in the finish:

RewriteRule stuff/public_html/vault/mystuff/view/(.*)/ /stuff/public_html/vault/mystuff/view/index.php?stuff=$1 [L]

I am unsure concerning the request getting this path inside it: /stuff/public_html/vault/mystuff/view - where does your document root indicate?

Would you publish your full apache?

Meantime, do this - it stops redirects when the system matches a current file or directory, which means you should only redirect the once:

RewriteEngine on

RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} !-d
RewriteRule stuff/public_html/vault/mystuff/view/(.*)/ /stuff/public_html/vault/mystuff/view/index.php?stuff=$1 [QSA,L]