htaccess 401 redirect problem

Discussion in 'Apache' started by gpmaster, Mar 17, 2011.

  1. #1
    My problem is that my 404 redirect to my index.htm file is not working. The only way I can get it to work is by removing the addtype application line below, but I need this for an included left navigation on the site. Any help would be great thank you.

    ErrorDocument 404 /

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$
    RewriteRule .* products/noimage.jpg [L]

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^cases.com [NC]
    RewriteRule ^(.*)$ http://www.cases.com/$1 [L,R=301]


    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    # Rewrite Rule for blog.cases.com
    RewriteCond %{HTTP_HOST} blog.cases.com$
    RewriteCond %{REQUEST_URI} !blog/
    RewriteRule ^(.*)$ blog/$1

    AddType application/x-httpd-php .html .php .htm
     
    gpmaster, Mar 17, 2011 IP