[thelist] Homepage as 404 Error

Stephen Rider evolt_org at striderweb.com
Wed Feb 18 14:36:54 CST 2004


On Feb 18, 2004, at 1:37 PM, live4bacon at optonline.net wrote:

> First off about the 404 pages I have read a where a few people 
> recommend using Absolute links (ie htttp://some.where.com) on the 404 
> pages....   But what about Root relative links off the 404 page would 
> these be ok?

I use "root relative" links without issue.  I believe the problem with 
relative links in your 404 page is that that page can effectively show 
up in any directory in your site... anywhere that there might be a page 
not found, that is.  Root relative links point to the same place within 
the site every time, and are therefore okay as long as those links are 
good.  :)

> Also the boss just wants to serve up the homepage as the 404 error 
> page, I seem to think that the SE spiders (as our current site is 
> indexed) would view this as spam and hurt our rankings, can you all 
> provide me some ammunition to go back to  the boss with on this, or 
> would it be ok to take his advice?

I don't know about technical issues, but this would confuse the hell 
out of me.  If I click a link deep in your site and end up at the home 
page, I would assume that you (the webmaster) didn't know what the heck 
you were doing.  You _have_ to somewhere along the line tell the user 
that the page they were looking for was not found.  Maybe do a 
ten-second auto-forward?  A page that says "File Not Found.  You will 
be redirected to our homepage in ten seconds", and then does it?  That 
seems like a somewhat workable compromise with your boss.  Really 
though, the 404 should link to the Site Map (you _do_ have a site map, 
right?  ;)

> In regards to the 301 redirect using .htaccess.   Can you use 
> wildcards in the 301 line?  (we have moved the site content from 
> /root/dir_site02/ *  to /root/dir_site03/*)

 From the htaccess tutorial at 
<http://www.javascriptkit.com/howto/htaccess.shtml>:

	"You can also redirect an entire directory by simple using Redirect 
/olddirectory http://yoursite.com/newdirectory/

	"Using this method, you can redirect any number of pages no matter 
what you do to your directory structure. It is the fastest method that 
is a global affect."

In other words, you don't need the wildcardt.  Just do the redirect on 
the directories.  I have used this method with 301 redirects and it 
works great.

Steve



More information about the thelist mailing list