Using .htaccess to redirect user to 404 page when ever an invalid url is enter.
To do this is very simple Follow the steps below.
ErrorDocument 404 /404.php
The code should look like this
# HTID:15003771: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW php_value display_errors 1 # DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:15003771: ErrorDocument 404 /404.php
Note: to add redirect to 404 page on each folder, you have to add .htaccess to each folder.
Top comments (0)