Mobile app version of vmapp.org
Login or Join
Courtney195

: 404 error on a file/directory that exists? We are using the vBulletin system. I have set it up so that it redirects 404 errors to a PHP page, so it follows the theme of the forum. However,

@Courtney195

Posted in: #Apache2 #Htaccess

We are using the vBulletin system.

I have set it up so that it redirects 404 errors to a PHP page, so it follows the theme of the forum.

However, if I go to a directory that exists (the admin directory to be precise), I get the 404 error.

The folder in question is .htaccess password protected, as well as leech protected. And this is happening to all .htaccess protected directories.

My .htaccess code is below:

RewriteEngine on

# 404 errors
ErrorDocument 404 /errors.php?do=404
ErrorDocument 403 /errors.php?do=403
ErrorDocument 500 /errors.php?do=500

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
# RewriteBase /forum/

# If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
# Options -MultiViews

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
RewriteRule ^entries/.* entry.php [QSA]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ .php?r= [QSA]

# Check MVC result
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ - [NC,L]
RewriteRule ^(.*)$ - [R=404,L]

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Courtney195

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme