Apache 2.2 mod rewrite issue
Just look toward the bottom for [UPHPU] Apache 2.2 mod rewrite issue. Here's what I said to open the thread:
Google searches for the entry in the error logs have not helped me resolve this. I have this on my new server:
ServerName flfn.org
ServerAlias
ServerAdmin admin at flfn.org
DocumentRoot /home/brasto/www/flfn
AllowOverride All
CustomLog /var/log/httpd/brasto/flfn/access_log combined
ErrorLog /var/log/httpd/brasto/flfn/error_log
Next three lines I'll want after fixing rewrite problem:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^flfn.org$ [NC]
RewriteRule ^(.*)$ http://flfn.org$1 [R=301,L]
Don't try to see the issue on FLFN.org since the site is still on my old server. I access it by modifying /etc/hosts with the new IP until the site is working. I have mod rewrite installed, and I can verify it by uncommenting the last three lines of that vhost. That rewrite works just fine. However, if I install Wordpress or Drupal and try to turn on friendly urls, they create a .htaccess file with these lines:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
With that the whole site seems to work except I can't go to
All friendly URLs work. In the .htaccess file, if I comment out every line except 'RewritEngine on' I still have the same problem, and can't request
Bad Request
Your browser sent a request that this server could not understand.
Apache/2.2.3 (CentOS) Server at flfn.org Port 80
Here's what I get in the vhost error logs when I request
[Wed Feb 24 15:05:50 2010] [error] [client 67.182.203.21] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /home/brasto/www/flfn/, referer:
As you can see, I have Options FollowSymLinks set in the vhost. The .htaccess file also has Options +FollowSymLinks in it.
Any ideas? Please remember to read the other thread to see what we already tried.
2 Replies
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
@kangaby:
Debian 5 - Look for index.php in conf.d/dir.conf
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
Thank you for your reply. I found the issue. Apparently I needed to comment out conf.d/welcome.conf .