.htaccess is not read by Apache

.htaccess is not read by Apache

Monday 27 August 2007 12:25:49 pm - 2 replies

Author Message

Bruce Morrison

Monday 27 August 2007 4:12:25 pm

Hi Pascal

I suspect that the "AllowOverride None" line is the issue. This line disables .htaccess files.

http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Pascal France

Tuesday 28 August 2007 12:13:39 am

Hi Bruce,

You're absolutely right.
I have to convert temporary:

   <Directory /usr/local/www> 
       Options FollowSymLinks 
       AllowOverride None 
   </Directory>

to

   <Directory /usr/local/www> 
       Options All 
       AllowOverride All 
   </Directory>

Once this done, I creat this .htaccess (with VirtualHost):

RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_ADDR} !^96\.204\.128\.89
RewriteRule $ /maintenance.html [R=302,L]

...and the maintenance.html file

Without VirtualHost, I can use this .htaccess:

Redirect 302 / http://www.luxpopuli.fr/maintenance.php?urlend=

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.