Link to home
Start Free TrialLog in
Avatar of BDC-Net
BDC-Net

asked on

htaccess 404 redirect help in IE

I am trying to get my .htaccess file to work with IE. It seems to work for with FF. Here is what I have:

ErrorDocument 404 /404.html

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] 
</IfModule>

Open in new window

SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BDC-Net
BDC-Net

ASKER

Here is the site I am working on: http://www.artizantile.com

I want to keep the domain with www. and I want it to redirect to a 404.html page when someone types in a url that doesn't exist.

Any help would be appreciated.

Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BDC-Net

ASKER

Do I need to surround this with <IfModule mod_rewrite.c> and  </IfModule>?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial