AllowOverride None and mod_rewrite?

BestBoard

Verified User
Joined
Sep 8, 2006
Messages
179
hi,
i want to set AllowOverride to None, but when i do it the rewrite engine is shut down.

i change it in the httpd.conf file
<Directory /home/*>
AllowOverride None
Options +MultiViews +Indexes +SymLinksIfOwnerMatch +IncludesNOEXEC
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

any solution?

Thanks!
 
because it's the global rule for the whole /home/*
for example, i have user x and this is his .htacces file (/home/x/public_html/.htaccess)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

if the AllowOverride is None the rewrite rules doesn't work, but if it's All everything work fine.

The reason that i want to set it to None, is to disable ExecCGI and allow it only in cgi-bin (if the user have an cgi permission).
 
but if AllowOverride set to All, they (the users) can change the -ExecCGI option.
so it's like i didn't do anything.
 
because it's the global rule for the whole /home/*
for example, i have user x and this is his .htacces file (/home/x/public_html/.htaccess)


if the AllowOverride is None the rewrite rules doesn't work, but if it's All everything work fine.

I will be the first to admit that I don't know everything but I do know that AllowOverride None means you cannot use a .htaccess file. So I am not sure what you are expecting out of a file that you cannot use.
 
Well, I thought it'll work, but it wont....... by templates I meant in /usr/local/directadmin/data/templates/custom/virtual_host2.conf
<Directory |DOCROOT|>
Options +Includes -Indexes -ExecCGI
Then again the CGI will be blocked in cgi-bin too as, by my/default template structure, the cgi-bin is just an alias.

If the cgi-bin was within its own <Directory> block, then my theory may work.........

Then again, they could override it all in the .htaccess :( Hmmm
 
well as floyd said, None is completely ignore .htaccess files.
so i change the AllowOverride to
AllowOverride FileInfo Limit AuthConfig
and now it works without any problems :)

(http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride - very helpful)

EDIT:
i get a weird problem.
when there is Option +FollowSymLinks in .htaccess file, then apache return error 500.
but my configuration ALLOW FollowSymLinks !
<Directory /home/*>
AllowOverride FileInfo Limit AuthConfig
Options -MultiViews -Indexes +FollowSymLinks +IncludesNOEXEC
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

Any ideas?
 
Last edited:
Back
Top