Dreamhost Error Pages
Contents |
Not only do they make your website more professional, they can also save you from losing visits to your site. If a visitor sees a 400 error page example generic error page, they are likely to leave your site. However,
Php Custom Error Handler
if they see a helpful error page, they may continue to stay because they can simply click custom error pages a link to go to another page within your site. Simple configuration To create a custom error page for your domain, add the following line to an .htaccess
404 Pages
file located in your domain’s web directory: ErrorDocument 404 /error.php This redirects browsers that experience a 404 error (Not Found) to the file "error.php" located in the same directory as your .htaccess file. Alternatively, you can use the above line as a template to create separate custom error pages for each error. Status codes The complete (and very long) list of errors is available here: Status codes Some of the most common errors you'll probably want to make entries for are: 400 – Bad Request 401 – Unauthorized 403 – Forbidden 404 – Not Found 500 – Internal Server Error For example, to catch those errors, you would add the following to your .htaccess file for the domain you'd like to configure: ErrorDocument 400 /error.php ErrorDocument 401 /error.php ErrorDocument 403 /error.php ErrorDocument 404 /error.php ErrorDocument 500 /error.php This forces a browser to redirect to the /error.php file if it encounters any of the status codes above. Setting up the error.php file Then, in error.php, add something similar to the following. This particular example is made for a wiki site: if someone visits http://www.example.com/Foo, then they are redirected to http://www.example.com/wiki/Foo. Anything after the last "/" is assumed to be a wiki article they are trying to reach:
you through why you may be seeing this error and how to resolve it. The root cause of the error The 'Site Not Found' error means the IP address your domain is using is not pointed to the correct IP. More technically, the 'Site Not Found' error means that the DNS records for your domain are resolving to the IP address of an Apache web server service that is not configured for your domain. When this happens, the Apache web server is designed to just show the first domain listed in its config file. To make sure that nobody's site ever accidentally shows a random https://help.dreamhost.com/hc/en-us/articles/215840318-Custom-error-pages site hosted on the same Apache service, DreamHost makes the first domain in all its config files show the same custom error page. There are a few reasons why your IP may not be correctly pointed to your web server IP which are explained below. Viewing your site’s IP address in your browser Due to the way that DreamHost configures Apache, unless you have purchased a Unique IP address https://help.dreamhost.com/hc/en-us/articles/215613517-Site-not-found for your domain, attempting to view your site by entering the IP address in your browser automatically gives you the Site not found error. This is because you’re viewing the shared IP of your web server, not the IP of your site. If you absolutely need to view your site through an IP address, you must purchase a Unique IP. You can read more about Unique IPs here: Unique IP DNS changes Frequently this error appears due to a change in your IP address, which is commonly triggered by removing hosting for a domain and then setting up a MIRROR, REDIRECT, PARK, or CLOAK. While changes to the DreamHost DNS are nearly instantaneous, the new information doesn't reach other servers around the world until the other servers expire the old data that they are holding on to. This is referred to as DNS propagation. The reason why you get this error during this period of time is that the DNS information you are receiving to your local computer is outdated, and the Apache instance that you are being incorrectly sent to no longer has any record of your site. Depending on your location, it can take up to several hours for DNS changes to propag
More info in my http://blog.dreamhosters.com/kbase/index.cgi?area=2429 blog… Please notice that this Knowledge Base will not be updated, and it's no longer possible to search the archive or to https://www.drupal.org/node/363844 comment the articles. Welcome, Guest. [ Log In ] Custom 403 (Forbidden) error pages. DreamHost Knowledge Base > error page DreamHost > Web Programming > Error messages > SearchKBase RelatedLinks: Custom 404 (File Not Found) error pages. Custom 401 (Failed Authorization) error pages. Custom 500 (Internal Server Error) error pages. Top4in this Area: 1. Custom 404 (File Not Found) error dreamhost error pages pages. 2. Custom 403 (Forbidden) error pages. 3. Custom 401 (Failed Authorization) error pages. 4. Custom 500 (Internal Server Error) error pages. Custom 403 (Forbidden) error pages. Please follow the instructions for making a Custom 404 error page but instead of naming the custom file missing.html, name the custom file forbidden.html. This page will show up when a file isn't set to be world readable, or when you've specifically blocked a user (probably by their ip or hostname) from accessing that page via an .htaccess file, OR when a user just cancels their attempt to log in. Last updated: Sep 12, 2002. Copyright © 1996 - 2005 New Dream Network, LLC. All rights reserved. Dreamhosters Network: Unofficial DreamHost Blog · DreamHostDreamHostWebmasterPHP at DreamHost · Rails at DreamHost
all over the world. Join today Community Community Home Getting Involved Chat Forum SupportPost installation Rewriting rules problem, .htaccess on dreamhost PS server doesn't load my custom ERROR.PHP page Posted by wwwoliondorcom on January 25, 2009 at 7:54am Rewriting rules problem, .htaccess on dreamhost PS server doesn't load my custom ERROR.PHP page Hi, Using dreamhost PS I have set a custom error.php page to be used as an error page but it seems that because of Drupal .htaccess file the server can't read my custom error.php page and just used dreamhost usual error page. I added these lines in the .htaccess file to tell the server to load error.php as indicated on Dreamhost wiki: ErrorDocument 500 /error.php ErrorDocument 501 /error.php ErrorDocument 502 /error.php ErrorDocument 503 /error.php ErrorDocument 504 /error.php ErrorDocument 505 /error.php ErrorDocument 506 /error.php ErrorDocument 507 /error.php ErrorDocument 510 /error.php http://wiki.dreamhost.com/Custom_error_pageshttp://wiki.dreamhost.com/Creating_custom_error_pages Do you know what I should change in Drupal .htaccess to be able to run error.php in case of error ? Any problem with Drupal htaccess rewriting rules ? Thanks a lot ! Log in or register to post comments ⋅ Categories: Drupal 5.x News itemsDrupal news Planet Drupal Association news Social media directory Security announcements Jobs Our communityCommunity Getting involved Services, Training & Hosting Groups & Meetups DrupalCon Code of conduct DocumentationDocumentation Drupal 8 docs Drupal 7 docs Developer docs api.drupal.org Drupal code baseDownload & Extend Drupal core Modules Themes Distributions Governance of communityAbout Web accessibility The Drupal Association About Drupal.org Terms of service Privacy policy Drupal is a registered trademark of Dries Buytaert.