vHost RewriteRule is creating a 500 Error

Posted by Andrew Ellis on Stack Overflow See other posts from Stack Overflow or by Andrew Ellis
Published on 2010-04-13T05:24:58Z Indexed on 2010/04/13 5:33 UTC
Read the original article Hit count: 469

Hello,

Below you will find my current vHost entry that I am using for a site that I currently have under development. This vHost entry works fine when I have it on my local machine, but when I push my code to my staging server that is running this same vHost record I receive a 500 Internal Server error.

The machine I'm running this vHost on is running Apache 2.2.9 (Debian).

<VirtualHost 206.217.196.61:80>
    SuExecUserGroup 13labs 13labs
    ServerAdmin [email protected]
    ServerName admin.13labs.net
    ServerAlias admin.13labs.net

    DirectoryIndex index.php
    DocumentRoot /var/www/13labs.net/html/admin/
    ErrorLog /var/www/13labs.net/logs/error.log

    # Hide .svn Directories
    <DirectoryMatch "\.svn">
            Order deny,allow
            deny from all
    </DirectoryMatch>

    # FastCGI
    Alias /fcgi-bin/ /var/www/13labs.net/fcgi-bin/

    AddHandler php-fastcgi .php
    AddType application/x-httpd-php .php
    Action php-fastcgi /fcgi-bin/admin-php.fcgi

    <Directory /var/www/13labs.net/fcgi-bin/>
            SetHandler fcgid-script
            AllowOverride None
            Options -Indexes +ExecCGI -FollowSymlinks -SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    <Directory /var/www/13labs.net/html/admin/>
            AllowOverride None
            Options -Indexes -FollowSymlinks -SymLinksIfOwnerMatch
            FileETag All
    </Directory>

    # Rewrite Logic
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^/(.+)$ /index.php/$1 [PT,QSA,L]

Thanks for any help that you can provide.

Best regards,
Andrew

© Stack Overflow or respective owner

Related posts about apache2

Related posts about mod-rewrite