Unable to find ‘full-path’ to my 404.php file

Question

I’m trying to find the full path of my 404.php file. I thought it would be like this:

ErrorDocument 404 /index.php?error=404

The reason for this is because I am trying to redirect non-IP permitted people to 404.php page using the .htaccess rule (written below)

My WordPress is at the root level of the domain. 404.php doesn’t load however…

Here is the .htaccess rule I have tried to get working:

ErrorDocument 401 /index.php?error=404 ErrorDocument 403 /index.php?error=404

<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_URI} ^(.*)?wp-login.php(.*)$ [OR] RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^IP Address One$
RewriteCond %{REMOTE_ADDR} !^IP Address Two$
RewriteCond %{REMOTE_ADDR} !^IP Address Three$ RewriteRule ^(.*)$ - 
[R=403,L] </IfModule>
0
henry 1 month 0 Answers 6 views 0

Leave an answer