| hanpedro |
08-09-2012 04:56 AM |
403 error under mod_rewrite and .htaccess
I have a 403 error under mod_rewrite and .htaccess.
The httpd error log message is,
Quote:
/var/www/html/usersite/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
|
And the setting of mod_rewrite is this.
At httpd.conf,
Code:
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/html">
Options FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
At httpd-vhosts.conf,
Code:
<VirtualHost *:80>
ServerAdmin webmaster@server2.net
DocumentRoot /var/www/html/usersite
ServerName usersite.dyndns.org
ServerAlias www.usersite.dyndns.org
<Directory /var/www/html/usersite/>
AllowOverride all
</Directory>
#php_admin_flag allow_url_fopen On
CustomLog "|/opt/lampp/bin/rotatelogs /opt/lampp/logs/usersite.dyndns.org_access_log.%Y-%m-%d 86400 +540" common
ErrorLog "|/opt/lampp/bin/rotatelogs /opt/lampp/logs/usersite.dyndns.org_error_log.%Y-%m-%d 86400 +540"
</VirtualHost>
At .htaccess,
Code:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^([a-zA-Z0-9_]+)$ blog/index\.php\?mb_id=$1
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ blog/index\.php\?mb_id=$1&id=$2
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/([0-9]+)/([0-9]+)$ blog/index\.php\?mb_id=$1&yyyy=$2&mm=$3&dd=$4
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/([0-9]+)$ blog/index\.php\?mb_id=$1&yyyy=$2&mm=$3
</IfModule>
Please let me know what I am wrong.
Thanks in advance.
|