Results 1 to 11 of 11
  1. #1
    ABW Ambassador Doug247's Avatar
    Join Date
    January 18th, 2005
    Location
    DE USA
    Posts
    931
    404 Question
    I swithched a site form being html based to being phpnuke based. I am getting tons of 404 error for obvious reasons.

    Is there a way in cPanel to have all 404 error redirected to the root of the site rather than a cutom 404 page? I think visitors are seeing the 404 and just clicking back.

    Thanks
    Doug

  2. #2
    ABW Ambassador DesignerWiz's Avatar
    Join Date
    January 18th, 2005
    Location
    U.S.A
    Posts
    2,777
    You can always try a rewrite rule for the 404 file path in the .htaccess file.
    Ray Thomas
    Webmaster Resources: http://DesignerWiz.com
    ABW Board Category: Programming / Coding
    http://forum.abestweb.com/forumdisplay.php?f=190

  3. #3
    ABW Ambassador Doug247's Avatar
    Join Date
    January 18th, 2005
    Location
    DE USA
    Posts
    931
    Quote Originally Posted by DesignerWiz
    You can always try a rewrite rule for the 404 file path in the .htaccess file.
    Sounds like a plan but I'm gonna help some help aka an example if possible.

    Thanks,
    Doug

  4. #4
    Roll Tide mobilebadboy's Avatar
    Join Date
    January 18th, 2005
    Location
    Mobile, Alabama
    Posts
    1,220
    Drop this in your htaccess:

    Code:
    ErrorDocument 404 /404.php
    Then create a file, 404.php, put this in it and upload it to your root directory:

    Code:
    <?
    header("HTTP/1.0 404 Not Found");
    header("Location: http://yourdomain.com");
    ?>
    Replace yourdomain.com of course.

    Shawn Kerr (.com) | Disney World | SEC Football

  5. #5
    ABW Ambassador Doug247's Avatar
    Join Date
    January 18th, 2005
    Location
    DE USA
    Posts
    931
    Cool
    Looks like I can handle that. Do SEs mind it?

    TIA,
    Doug

  6. #6
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    Sacramento, CA
    Posts
    1,263
    or just put your URL... & then there's no need for a 404 page, unless you want to see all the people being redirected thru that page.

    Code:
    ErrorDocument 404 http://www.yourdomain.com
    create htaccess.txt w/ the line above (change to your domain name), upload it to your server, change the name to .htaccess & you're set.
    Hi, I'm a signature.

  7. #7
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    Wouldn't it be better to just use mod_rewrite or something similar to either show or redirect people to the right pages instead of the main page?

    For instance,

    index.html -> index.php
    categories.html -> categories.php

    Are the directory structures and the page names the same, just the extensions different?

    If there are some exceptions, is it a manageable number?

    If so, I would recommend redirecting or mod_rewriting to the similar pages.
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  8. #8
    Action Jackson - King of the World
    Join Date
    January 18th, 2005
    Posts
    2,201
    We actually talked about this in chat a little and how it might affect your rankings

  9. #9
    Full Member Tech Evangelist's Avatar
    Join Date
    March 16th, 2005
    Location
    Mesa, AZ
    Posts
    374
    Ideally, you want to follow Michael's advice and use a 301 redirect from each old page URL to the new one. With a 301 status code, as the search engines follow the old links they will change them to the new links in their databases.

    If you have a lot of pages in the site and the task is too large, use the .htaccess error 404 routine mentioned above and send them to another page. That way, you won't generate a blank error page and you capture any user who finds an old link in a search engine. My preference is always to send them to a seperate error 404 page. If you sell products on your site, it's a great place to display special deals.

    A 301 status code causes a search engine to change a URL in their database.

    A 404 status code causes them to remove an obsolete URL.
    There's good, fast and cheap. Pick any two.
    [url=http://www.topranksolutions.com]Phoenix SEO[/url] :: [url=http://www.tech-evangelist.com/category/affiliate-marketing/]Affiliate Marketing Tutorials[/url]

  10. #10
    Marketing Mistress Lectrickitty's Avatar
    Join Date
    June 15th, 2005
    Location
    Broken Bow, OK
    Posts
    336
    not trying to hijack the thread, but this is similar...

    I moved a complete site from a free page at angelfire to a named domain. Is there any way to do a 301 from angelfire to the new pages? I've been trying different ideas, but haven't found one that works yet. Angelfire doesn't want to loose the traffic so they make it hard to forward pages. The site is ranked 6 so I would like the ranking to go with the site if possible.
    [color=blue]"Those who give up their freedom for a little security deserve neither freedom nor security" - Benjamin Franklin[/color]

  11. #11
    general fuq mrbshouse's Avatar
    Join Date
    January 18th, 2005
    Location
    Argieville
    Posts
    1,381
    Have you considered using a redirect (option in cpanel) to setup a 301 redirect from your 404 to the new index?

    Seems like that would be the easiest.

  12. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Featured: Soft 404 (Noindex & 404) Part 2
    By kse in forum Search Engine Optimization
    Replies: 2
    Last Post: March 16th, 2012, 10:13 AM
  2. 404 Pages
    By Doug247 in forum Search Engine Optimization
    Replies: 5
    Last Post: July 24th, 2008, 03:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •