gnurob
January 4, 2012, 10:24am
1
Source: Apache.org
The .htaccess file is not read by the server based the test above and the lack of change in the operation of the server.
httpd.conf
<Directory />
Options None
AllowOverride All
# Initially this was set to None and I would prefer it be again, just testing
Order deny,allow
Deny from all
</Directory>
AccessFileName .htaccess
Include default-server.conf
default-server.conf
<Directory "/dir/dir/dir/dir">
AllowOverride All
Options All
</Directory>
The .htaccess file is r by the web server user and group and exists in the correct directory.
Anyone know why this file is not working?
Thanks!
vbe
January 4, 2012, 11:45am
2
Did you restart the server after modifications?
gnurob
January 4, 2012, 1:33pm
3
Yes, and confirmed the server was stopped / no processes before restarting.
gnurob
January 18, 2012, 9:19pm
4
I'm still stuck on this one. Anyone with a fresh idea for me to chase down? Thx
check the apache logs to see if there are any relevant log entries. Do you get any errors when visiting a page in that directory or is the .htaccess just getting ignored? please post the contents of .htaccess so we can see what your trying to do.
gnurob
January 21, 2012, 5:57pm
6
Been through those a few times
Its just ignored. Here's the output from:
server:/var/log/apache2 # clear ; echo ACCESS ; tail -n 15 www.domain.com-access_log ; echo ERROR ; tail -n 15 www.domain.com-error_log
ACCESS
1.2.3.4 - - [21/Jan/2012:19:17:43 -0330] "GET /filename.php HTTP/1.1" 200 61184 "-" "Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
1.2.3.4 - - [21/Jan/2012:19:17:43 -0330] "GET /enviro.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524 "http://www.domain.com/filename.php" "Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
1.2.3.4 - - [21/Jan/2012:19:17:43 -0330] "GET /enviro.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146 "http://www.domain.com/filename.php" "Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
ERROR
server:/dir/dir/dir/www.domain.com # cat .htaccess
wysisyg <- this line should generate an error to confirm file is parsed. it doesn't
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
# Rules to correctly serve gzip compressed CSS and JS files.
# Requires both mod_rewrite and mod_headers to be enabled.
<IfModule mod_headers.c>
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
# Serve gzip compressed JS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
# Serve correct content types, and prevent mod_deflate double gzip.
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
<FilesMatch "(\.js\.gz|\.css\.gz)$">
# Serve correct encoding type.
Header set Content-Encoding gzip
# Force proxies to cache gzipped & non-gzipped css/js files separately.
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>
</IfModule>
Above is the stock .htaccess file that ships with Drupal 7 (other than the first two lines which are intended to generate an error.)
Thanks for offering some suggestions...
gnurob
January 31, 2012, 5:40pm
7
Everyone stumped? Me too!