Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    91
    Thanks
    19
    Thanked 0 Times in 0 Posts

    403 error under mod_rewrite and .htaccess

    I have a 403 error under mod_rewrite and .htaccess.


    The httpd error log message is,

    /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.

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Check the permissions on the /var/www/html/usersite/.htaccess file. The error message you posted says specifically that it can't be read, so the read permissions may have been removed or the user apache is running as doesn't have access to the file.

  • #3
    New Coder
    Join Date
    Jun 2005
    Posts
    91
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Inigoesdr/

    I appreciate your kindness.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •