Is there a way to enter a RewriteRule in the htaccess file to redirect to a 404 page if a certain folder/url path as been typed or reached?
For example, if I want ev
Instead of using mod_rewrite, you can do this with a RedirectMatch directive:
mod_rewrite
RedirectMatch
RedirectMatch 404 ^/abc/.*$
I did this on my website:
RewriteRule ^404/?$ 404.php ErrorDocument 404 http://www.example.com/404/
And on the root of my website I placed a 404.php page to customize that page.
404.php