Hello,
I am extremely new to .htaccess, and I have a lot of questions.
As for this post, though, I only have one.
How can I create a 404 redirect in .htaccess?
I’ve attempted the ErrorDocument 404 somefilehere.php, but it doesn’t work.
Here’s my code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /Bloody/
RewriteRule ^([^.]+)$ index.php?title=$1
A basic URL would look like mydomain.com/Bloody/Page+Title.
I want to make it so that if you go to mydomain.com/Bloody/Page+Title/Additional+Stuff+Here, it will redirect to a 404.
For the time being, it just displays a white page with all of my text on it, and it screws up the file path for my css file.
So really, if an additional slash is added to the URL, I want it to go to a 404 page.