The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

redirect command for ALL "not found" pages?

Discussion in 'General Discussion' started by JeffG99, Jan 10, 2010.

  1. JeffG99

    JeffG99 Registered

    Joined:
    May 27, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I would like to cover all my bases in terms of any "not found" pages on my site. Ideally, any such pages would be redirected to the home page. Is this possible without knowing which pages they are? One way is in the .htaccess file, like this perhaps?

    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]

    RewriteRule \/.+ / [L,R]



    Or can I do it via cPanel somehow?

    Thanks for your help!
     
  2. smooch1502

    smooch1502 Member

    Joined:
    May 12, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Simply make a custom error page and put a html redirect in it to the home page
     
  3. JeffG99

    JeffG99 Registered

    Joined:
    May 27, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for your reply - Could you give me a few more details regarding how to do this? Apologies, my computer skills are not as good as they need to be.

    Where do I make this page? Where do I put this page? Where do I put the redirect? In the blog, in cPanel? In the .htaccess?

    Also - will this satisfy the search engines?

    Thank you!
     
Loading...

Share This Page