Results 1 to 6 of 6

Thread: Problems setting up custom 404 error page with cpanel

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    3
    cPanel Access Level

    Website Owner

    Default Problems setting up custom 404 error page with cpanel

    Hi,

    My site is on shared hosting and I'm using the cPanel Pro 1.0 (RC1). I've recently worked through the error pages feature on the cpanel to create a basic custom 404 error page which has been uploaded to the root folder as '404.shtml'.

    The problem is that I can see the page at /http://www.englishlc.com/404.shtml however it is not being linked to when I type in an incorrect site page.
    I've tried inserting 'ErrorDocument 404 /404.shtml' into the htaccess file but that hasn't made a difference. Am I missing something simple here? Any clues would be much appreciated.

    Barnez1

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    11,681
    cPanel Access Level

    Root Administrator

    Default Re: Problems setting up custom 404 error page with cpanel

    Looks like you might have something going on in your .htaccess file that's catching incorrect URLs and forwarding back to homepage.

  3. #3
    Registered User
    Join Date
    May 2012
    Posts
    3
    cPanel Access Level

    Website Owner

    Default Re: Problems setting up custom 404 error page with cpanel

    Many thanks for your reply. My htaccess file is as follows:

    Code:
    # Created by Redirection Module: Apache
    # Tue, 29 May 2012 08:38:40 +0000
    # Redirection 2.2.13 - Redirection – Manage 301 redirections without modifying Apache | Urban Giraffe
    
    <Files .htaccess,.svn>
    order allow,deny
    deny from all
    </Files>
    Options +FollowSymlinks
    
    <IfModule mod_rewrite.c>
    </IfModule>
    
    # End of Redirection
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    #If you serve pages from behind a proxy you may want to change \'RewriteCond %{HTTPS} on\' to something more sensible
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
    </IfModule>
    
    # END WPSuperCache
    
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    ErrorDocument 404 /404.shtml
    Are you able to see a conflict there?

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    11,681
    cPanel Access Level

    Root Administrator

    Default Re: Problems setting up custom 404 error page with cpanel

    I can't comment on this, but, rename it to kill / disable it for a moment. See if your error pages work then.

  5. #5
    Registered User
    Join Date
    May 2012
    Posts
    3
    cPanel Access Level

    Website Owner

    Default Re: Problems setting up custom 404 error page with cpanel

    I tried your suggestion. After isolating the .htaccess file by renaming it, the custom 404 page shows when I try a false site page; however it also shows when I use a true sitepage url.

  6. #6
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    11,681
    cPanel Access Level

    Root Administrator

    Default Re: Problems setting up custom 404 error page with cpanel

    This is something you'd want to take up on the wordpress support forums, or with that plugin author directly:
    /http://wordpress.org/tags/redirection?forum_id=10

    (Top of your code above mentions the redirection module.)

    This doesn't appear to be a cPanel issue I don't think.

Similar Threads

  1. Custom 404 Page
    By cancer10 in forum General Discussion
    Replies: 2
    Last Post: 03-17-2008, 11:42 AM
  2. Problem with Custom Error Page (404.shmtl)
    By mbuttrey66 in forum General Discussion
    Replies: 10
    Last Post: 08-15-2007, 10:27 AM
  3. Custom 404 Page
    By ilan in forum General Discussion
    Replies: 1
    Last Post: 06-22-2005, 11:22 AM
  4. 404 error when adding custom 404 page.
    By VS-Lap in forum General Discussion
    Replies: 0
    Last Post: 11-07-2002, 12:01 AM
  5. 404 custom page not showing.
    By hedgehog in forum General Discussion
    Replies: 3
    Last Post: 02-14-2002, 12:03 PM
bargain