redirect 404, domain.com to www.domain.com index.xxx to www.domain.com

I need help .htaccess file which would proform the following:

redirect all error pages including 404 to www.domain.com
permanent redirect domain.com -> www.domain.com
permanent redirect domain.com/index.xxx -> www.domain.com

Also if there is a way to fix this errorIm getting this error Error: 406 Not Acceptable
ido90Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

COBOLdinosaurCommented:
If your users are getting a 406 error it is because the server is trying to send something that the browser has indicated it will not accept.  Generally it would be an unacceptable MIME type or an encoding issue.  

as for the redirect, why not just make make www.domain.com/index.html the 404 page:

in the .htaccess

ErrorDocument 404 http://www.domain.com/index.html
ErrorDocument 403 http://www.domain.com/index.html
ErrorDocument 406 http://www.domain.com/index.html



Cd&
0
ido90Author Commented:
How do you redirect the .domain to www.domain and also deal with the index.xxx to /?
0
COBOLdinosaurCommented:
I think what you are askking there is answered with:
Options +FollowSymLinks 
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Open in new window



Cd&
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James MurrellProduct SpecialistCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Miscellaneous

From novice to tech pro — start learning today.