1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

.htaccess error

Discussion in 'Web Design & Development' started by ELECTR0ZED, Jun 17, 2016.

Thread Status:
Not open for further replies.
  1. ELECTR0ZED

    ELECTR0ZED Thread Starter

    Joined:
    Jun 17, 2016
    Messages:
    2
    Help

    For my page i am designing i have added into my .htaccess file an errordocument which doesnt work and is causing my page to have an error 500 internal server

    Here is the code which is messing it up:

    //Custom 400 errors
    ErrorDocument 400 /errorpages/400.htm

    //Custom 401 errors
    ErrorDocument 401 /errorpages/401.htm

    //Custom 403 errors
    ErrorDocument 403 /errorpages/403.htm

    //Custom 404 errors
    ErrorDocument 404 /errorpages/404.htm

    //Custom 500 errors
    ErrorDocument 500 /errorpages/500.htm

    Here is the full .htaccess document:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^\.]+)$ $1.html [NC,L]

    SetEnv SERVER_ADMIN [email protected]

    DirectoryIndex index.htm

    //Custom 400 errors
    ErrorDocument 400 /errorpages/400.htm

    //Custom 401 errors
    ErrorDocument 401 /errorpages/401.htm

    //Custom 403 errors
    ErrorDocument 403 /errorpages/403.htm

    //Custom 404 errors
    ErrorDocument 404 /errorpages/404.htm

    //Custom 500 errors
    ErrorDocument 500 /errorpages/500.htm

    I hope someone can help

    Thanks
     
  2. ELECTR0ZED

    ELECTR0ZED Thread Starter

    Joined:
    Jun 17, 2016
    Messages:
    2
  3. colinsp

    colinsp

    Joined:
    Sep 5, 2007
    Messages:
    2,231
    First Name:
    Colin
    Do you have a path error?

    What happens if you type http://yourdoamin.com/errorpages/500.htm into your browser? Do you go to your 500 page? I expect not. Check your path, check the spelling particularly letter case and also ensure that the html page displays correctly.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1173089

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice