Bug 12395

Summary: "RewriteEngine off" forbidden if "Options -FollowSymLinks"
Product: Apache httpd-1.3 Reporter: Dr. Georg Czedik-Eysenberg <apache>
Component: mod_rewriteAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: normal CC: apache, info, T.Phillips
Priority: P3    
Version: 1.3.23   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Dr. Georg Czedik-Eysenberg 2002-09-08 11:25:12 UTC
"Options -FollowSymLinks" combined with "RewriteEngine on" (in ".htaccess") 
results in the error message "Options FollowSymLinks or SymLinksIfOwnerMatch is 
off which implies that RewriteRule directive is forbidden".

I suppose, that this is o.k., although I did not find it specified 
in "http://httpd.apache.org/docs/mod/mod_rewrite.html".

But also "Options -FollowSymLinks" combined with "RewriteEngine off" results in 
this error message and I this, that this is a bug.

Now you might ask, why I want to use "RewriteEngine off",
although this is the default, but I have a reason for this:

In the root directory of my (virtual) server I have "Options +FollowSymLinks" 
and I want to use "RewriteEngine on" (this is no problem).

But in the subdirectory "cgi-bin" there seems to be implicitly
"Options -FollowSymLinks" and even an explicit "Options +FollowSymLinks"
does not work (WHY???) and therefore I want to set "RewriteEngine off" there, 
in order to be able to use the "cgi-bin" directory without getting the above-
mentioned error message.
Comment 1 Dr. Georg Czedik-Eysenberg 2002-11-03 08:54:39 UTC
Hi,

is there really nobody out there, who is interested in this bug,
which I reported 8 weeks ago and is still in the status NEW? :-(

Or do you need any additional information from me?

Regards, Georg
Comment 2 André Malo 2002-12-29 01:52:12 UTC
Sorry for the long delay.
It's fixed now in HEAD (i.e. httpd-2.1.0-dev) and will probably be backported to
1.3 and 2.0.

Thanks for using Apache!
(and thanks for your patience...)
Comment 3 André Malo 2003-01-29 02:32:57 UTC
*** Bug 16526 has been marked as a duplicate of this bug. ***
Comment 4 Trevor Phillips 2003-01-29 02:54:10 UTC
Has this been resolved in Apache 1.3 yet?
I notice it was originally logged in this bug against 1.3.23. I use 1.3.26
(Debian Packages) and it hasn't been resolved. Skimming the 1.3.27 CHANGES file
I can see no mention of it being fixed there either...
Comment 5 André Malo 2003-01-29 03:11:03 UTC
Ah, sorry, perhaps I should mention the state ;-)
It's resolved for the next releases of 2.0.45 and 1.3.28.
Comment 6 Sander Holthaus 2003-02-18 15:09:24 UTC
If I use this

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} ^(.*)$
    RewriteRule ^(.*)     -       [CO=referrer:%1:.domain.com]

in combination with -FollowSymLinks, I also get the error:
 
"Options FollowSymLinks or SymLinksIfOwnerMatch is 
off which implies that RewriteRule directive is forbidden"

I'm not rewriting any URL, I just want to write out a coookie. Is this fixed in 
this bugfix too?
Comment 7 André Malo 2003-02-18 15:15:53 UTC
No.
Options -FollowSymlinks means that you can't have any RewriteRules active.
You may use mod_headers for only setting headers...