I'm having big probs trying to get vb to use a custom 404 page and to react uniformly to missing pages.
Here is my htaccess:
I have a custom 404.html page at the location specified in htaccess.
Examples of the problem I'm having (with htaccess as above):
There is nothing at http://www.mydomain.com/content/ffr so trying to load that address should produce a 404. However, I get the following from vb:
'The page that you have requested was not found. If you followed a valid link, please notify the administrator'. If I check the HTTP header status on that link it returns a '200 OK' and not a 404.
There is nothing at http://www.xxxxx.com/ght.php but calling that page produces a 500 internal server error as opposed to my custom 404 page.
If I remove the last line in my htaccess (the MVC rule) I get the following result for the two links above:
first link gives the same result, second link opens my custom error page 404.html (HTTP header code for the link is 404).
If I now go to my CMS page I get a 404 when I click on a section title and to fix that I obviously need to reinstate the MVC rule in htaccess which of course sends me neatly back to square one...
I'd really appreciate some assistance with this.
Thanks
Here is my htaccess:
PHP Code:
ErrorDocument 404 /404.html
RewriteEngine on
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xxxxx.com
AuthUserFile /home/xxxxx/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/xxxxx/public_html/_vti_pvt/service.grp
# 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} -s [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} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
Examples of the problem I'm having (with htaccess as above):
There is nothing at http://www.mydomain.com/content/ffr so trying to load that address should produce a 404. However, I get the following from vb:
'The page that you have requested was not found. If you followed a valid link, please notify the administrator'. If I check the HTTP header status on that link it returns a '200 OK' and not a 404.
There is nothing at http://www.xxxxx.com/ght.php but calling that page produces a 500 internal server error as opposed to my custom 404 page.
If I remove the last line in my htaccess (the MVC rule) I get the following result for the two links above:
first link gives the same result, second link opens my custom error page 404.html (HTTP header code for the link is 404).
If I now go to my CMS page I get a 404 when I click on a section title and to fix that I obviously need to reinstate the MVC rule in htaccess which of course sends me neatly back to square one...
I'd really appreciate some assistance with this.
Thanks
Comment