If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How to Redirect Broken Links to the index?

How to Redirect Broken Links to the index?

Started by feznizzle on 28 May 2010, 5:10 AM · Views: 2,160

Results 1 to 2 of 2
28 May 2010, 5:10 AM
#1
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Post #1 by feznizzle

Hi!

This is an emergency for me! Any help would be deeply appreciated!

In a nutshell: my site went down, I have an explanation for it on my index. I'd like to have redirects in place so my morning traffic is pointed to it, no matter where they try to come in.

I do not care about SE response, I just want to redirect.

I am looking for the simplest, fastest, down and dirty way to redirect all broken links to the index?

Can I handle this in my htaccess? If so, can you pretty, pretty, pretty please supply me with a bit of code that I can paste in?

Desperately yours,
Mike (not Madonna!)

28 May 2010, 11:49 AM
#2
g1smd avatar

g1smd

Zen Follower

Join Date:
Mar 2010
Location:
UK
Posts:
449
Plugin Contributions:
0

Post #2 by g1smd

Do you want ALL URL requests other than exactly http://www.example.com/ to be shown the error message, or do you want all URL requests that do not match real categories and real products to show the error message? That's a crucial difference.

Personally, I would add the message to the custom 404 error page that is invoked by the ErrorDocument 404 /index.php?main_page=page_not_found or ErrorDocument 404 /zencart/index.php?main_page=page_not_found entry in your .htaccess file.

The alternative is to add the message text to the header of every page for a few days.

Online since 1995.