404 page redirecting using .htaccess
popoola Temitope
Posted on May 10, 2021
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.
đź’– đź’Ş đź™… đźš©
popoola Temitope
Posted on May 10, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.