A
A
anriko2018-12-07 21:04:28
htaccess
anriko, 2018-12-07 21:04:28

How to add a redirect from a non-existent page to 404?

# redirect all requests to index.php loader
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]

</IfModule>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Ermilichev, 2018-12-07
@Masas

ErrorDocument 404 /404.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question