[plug] mod_rewrite: Out of chickens!

Trevor Phillips T.Phillips at murdoch.edu.au
Tue Jan 28 17:21:47 WST 2003


Ok, I've sacrificed all the chickens I've got, but I STILL can't get this 
frelling mod_rewrite to behave, so I'd appreciate if anyone else familiar 
with the dark arts of Apache and mod_rewrite could possibly offer some 
suggestions.

Basically, across a website, I want to remap internally certain URIs.
I also have a cgi-bin dir which I like to clamp down on security.

So, I had this (paths changed to protect the innocent):

<Directory /document/root>
  RewriteEngine on
  RewriteBase /
  RewriteRule ^askedfor/path new/path [L]
</Directory>

Now, this in itself works as I want. However, my /cgi-bin/ dir has crapped 
itself:
   Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that 
RewriteRule directive is forbidden

Yes, I have these options off for /cgi-bin/. Funny about that.

Now, the thing is, the Rule doesn't TOUCH cgi-bin. Heck, I don't WANT it to. 
But just to make sure, I added a RewriteCond before the Rule:

  RewriteCond %{REQUEST_URI} ^/askedfor/path.*
  RewriteRule ^askedfor/path new/path [L]

So, now it shouldn't even look at the rule, as the condition won't match - but 
it still ain't working! It's still tainting cgi-bin, and refusing to just act 
normally for cgi-bin.

Although I'd like ideas, I'd rather have solutions. I've tried various ways to 
get around this but to no avail.

Am I missing something? Is there a nice-ish solution that works, without 
having to enable SymLinks for cgi-bin?

-- 
. Trevor Phillips             -           http://jurai.murdoch.edu.au/ . 
: Web Technical Administrator     -          T.Phillips at murdoch.edu.au : 
| IT Services                        -              Murdoch University | 
 >--------------------------------------------------------------------<
| On nights such as this, evil deeds are done. And good deeds, of     /
| course. But mostly evil, on the whole.                             /
 \      -- (Terry Pratchett, Wyrd Sisters)                          /



More information about the plug mailing list