ErrorDocument (.htaccess)

  • Thread starter Thread starter Deleted member 745
  • Start date Start date
D

Deleted member 745

Guest
Hi,

How come if I add this to my .htaccess it still gives thisusing XF : if I type something that does not exist like a file or folder - http://mysite.com/hjhjh (A controller for the route path hjhjh was not found.) and it does not goto my error 404 document instead?

PHP:
  ErrorDocument 400 /errors/400.php
  ErrorDocument 401 /errors/401.php
  ErrorDocument 403 /errors/403.php
  ErrorDocument 404 /errors/404.php
  ErrorDocument 500 /errors/500.php

But if I add the bit in .htaccess that was included with XF below

PHP:
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

I still get the same error (A controller for the route path hjhjh was not found.)
 
Unless you remove the .htaccess completely (and don't use full friendly URLs) or the 404 happens within a specific directory (eg, styles), yes.
 
Top Bottom