Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

About Error 404 Not Found

vrijvlindervrijvlinder Papillon-Sauvage MVP

Error 404 Not Found happens when the address to a file can't be found. This can be due to several factors. The first one you should look at is your .htaccess file.

The .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration. They are placed inside the web tree, and are able to override a subset of the server's global configuration for the directory that they are in, and all sub-directories.

The .htaccess files can override many other configuration settings including content type and character set, CGI handlers, etc.

The .htaccess file is often used to specify security restrictions for a directory, hence the filename "access". The .htaccess file is often accompanied by a .htpasswd file which stores valid usernames and their passwords.

Servers often use .htaccess to rewrite long, overly comprehensive URLs to shorter and more memorable ones.

Use allow/deny to block users by IP address or domain. Also, use to block bad bots, rippers and referrers. Often used to restrict access by Search Engine spiders.

Control how the server will react when no specific web page is specified.

Changing the page that is shown when a server-side error occurs, for example HTTP 404 Not Found or, to indicate to a search engine that a page has moved, HTTP 301 Moved Permanently.

Instruct the server how to treat different varying file types.

The .htaccess files allow a server to control caching by web browsers and proxies to reduce bandwidth usage, server load, and perceived lag.

Most apps like Vanilla, contain an .htaccess file inside of the forum folder.

It looks much like this after being modified with the subdirectory name of the forum, If it is in the Root you would simply leave after the backslash empty /:

# Modified
# If you modify this file then change the above line to: # Modified
<IfModule mod_rewrite.c>
   RewriteEngine On
   # Certain hosts may require the following line.
   # If vanilla is in a subfolder then you need to specify it after the /. 
   # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
   RewriteBase /thenameofmysubdirectory
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
</IfModule>

This is what it looks like for Root install

# Modified
# If you modify this file then change the above line to: # Modified
<IfModule mod_rewrite.c>
   RewriteEngine On
   # Certain hosts may require the following line.
   # If vanilla is in a subfolder then you need to specify it after the /. 
   # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
</IfModule>

If after fixing your .htaccess file you still get 404 not found errors, you will need to check the links and see if they are pointing in the correct path.

Sometimes it is necessary to put in the full path to an image or file. A simple mistake like a typo in the link can also cause a not found error.

UnderDoghgtonightBleistivtjackmaessen

Comments

Sign In or Register to comment.