Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

404 error redirect question?

Status
Not open for further replies.

doubledee999

Level 5
Legacy Platinum Member
Joined
Aug 19, 2002
Messages
382
Reaction score
0
Hi,

I have many domains pointing to the same place, and today I noticed about 500 404 error page on my stats.

I was wondering if anyone knows of a script or some code that will take 404 error pages (other error pages would be good too) and make them redirect to the main page?

Any help would be appreciated.
thanks
dennis
 

Anthony Ng

@Nameslave
Legacy Exclusive Member
Joined
May 22, 2002
Messages
4,567
Reaction score
14
You don't need a script; just write a line in your .htaccess file like:

ErrorDocument 404 (http://www.your-domain.com)/whatever-page.html

Both absolute or relative URL should work. Hope this helps.
 

doubledee999

Level 5
Legacy Platinum Member
Joined
Aug 19, 2002
Messages
382
Reaction score
0
I think you have solved my problem., I appreciate it.
thanks
dennis
 

tonyk2000

DNF Member
Legacy Exclusive Member
Joined
Oct 26, 2002
Messages
361
Reaction score
1
In this case:
ErrorDocument 404 /whatever-page.html
Some versions of InternetExplorer may NOT show this error page if it is too small. I guess at least 25-30 Kb size is required.
 

lgolding

Level 3
Legacy Platinum Member
Joined
Jan 25, 2003
Messages
73
Reaction score
0
to get more detail, use 'guardian.cgi'. I forgot where I got it, do a search for it relative to 404 errors. Let me know if you can't find it. It reveals much info about your 404 requests, which revealed to me where the traffic was coming from, allowing me to manipulate my domains useage.

An example, I picked up some old domains that had old sites. The old links were still sending traffic, sometimes from deep directory pages. I was able to set up identical directory/file names and show the surfers specific content, efective for affiliate stuff. I also found some sites trying to show the an old domains logo.gif, (they were stealing am image off of another domain for thier domains homepage) so I gave a copy of my logo the identical file name, and now MY logo shows up on thier page, they have no idea where it is coming from! Funny stuff. Also, it showed me which domains were gettign the old link traffic and which ones were not.

You set your htaccess to go to the guardian.cgi on any type of error you like, 404, 401, 501, etc, and it sends you an email of a report of the hit, or files it for you. It shows the IP, linking url, and the file requested, all the http header stuff you can't get with a quick 404 redirection. And after it sends you the email it THEN does the redirect to your desired 404 catch page, homepage, whatever.

If you have a host/server related error, like 500 series errors, you can set it to mail your host admin to alert them about it automatically while you sleep, if your site goes down they need to hop to it.

Also, you can see when people are poking around your site deep in the directories, stabbing at file names, perhaps hacking around; you got their ip, browser type, host name, etc. if you ever needed it.

More involved that you may have asked for, but very good when that stuff matters, especially when you run a bunch of dropped domains!

Regards.
L Golding
 

doubledee999

Level 5
Legacy Platinum Member
Joined
Aug 19, 2002
Messages
382
Reaction score
0
L Golding,

thanks I have heard about guardian.cgi I believe it was available on hotscripts.com thanks for the tip

dennis
 
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 1) View details

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Premium Members

Upcoming events

Latest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom