HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Tutorial] Diagnose "Page Not Found" (404) Errors

ShadowdareShadowdare r_j MVP
edited December 2013 in Tutorials


The "page not found" (404) error happens when a page you are trying to open does not exist or there is a problem with the link. Here are some tips for diagnosing this error.

Common Ways the 404 Error Could be Displayed & Some Reasons for It

One of the common ways that the 404 error could be displayed is by the web browser itself, meaning the link to the page directs to something that does not exist, the link is incorrect, or the website is returning a 404 header to the browser.

Another way the error could be displayed is through a generic page of the web server.

The error could also be rendered through Vanilla's special 404 pages, also known as a view, that could look like a page rendered with your forum's theme or even a pale shade of blue colored page with the error message that looks like the bonk error page.

404 Error Related to the .htaccess File

Websites running on the Apache web server uses the .htaccess file provided in the Vanilla download archive. The file sets rules for the web server for handling things such as pretty URLs. The configuration may need some changes for some websites.

404 Error Related to Pretty URLs

Pretty URLs is a feature in Vanilla. It becomes enabled automatically during the install process if the .htaccess file is working. It can also be enabled via a new line in the /conf/config.php file containing $Configuration['Garden']['RewriteUrls'] = TRUE;. In some cases, you may see a 404 error when visiting a pretty URL on your forum.

One way to diagnose the 404 error is to go to the full script path of Vanilla's page. For example, your http://example.com/message/inbox link shows a 404 error. You should go to the full script path at http://example.com/index.php?p=/message/inbox (index.php?= has been inserted in the URL) to see if the page shows up correctly with that path. If it works, then it is most likely a problem with the .htaccess configuration.

Finally, after figuring out what's the cause of your 404 error, you are now further in the troubleshooting process and have an idea of what to search for and details to specify in your discussions. Be sure to leave the Vanilla version number that you are using.

Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.