Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Redirect my 404 pages to the homepage

Posted on 2010-11-24
4
Medium Priority
?
576 Views
Last Modified: 2012-05-10
I have a site with many pages which have external links pointing to them.

I've renamed many pages on my site.


So now lots of those external links produce 404 pages on my site which is bad.


Question:
How can I (.htaccess?) redirect (301) all of those 404 pages to the homepage, so if a link points to http://mydomain.com/invalid_page.html

and that page doesn't exist, I want the user when clicking on that link to get to: http://mydomain.com


Thanks
0
Comment
Question by:xcdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:PorterGraphics
ID: 34208203
You should be able to set up a custom 404 page through your host provider. Select your homepage as the page that is displayed when a 404 error is encountered.
0
 
LVL 3

Expert Comment

by:KevinTHayashi
ID: 34208243
What is the webserver platform?  IIS, Apache, something else???

Do you have access to the webserver to make changes?  PorterGraphics is absolutely right on custom 404 error pages and something that is done all of the time.
0
 

Author Comment

by:xcdev
ID: 34208330
It is an apache server

I have access to it.


I want it to be a redirect so I won't lose the SEO, I don't want google to think I have abd page - a 404
0
 
LVL 3

Accepted Solution

by:
KevinTHayashi earned 2000 total points
ID: 34208395
In your .htaccess file add a line for:

ErrorDocument 404 /index.html

More info here:
http://bignosebird.com/apache/a7.shtml

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses how to implement server side field validation and display customized error messages to the client.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question