I have this in my htaccess:
Options +FollowSymLinks
Options -Indexes
RewriteEngine On
RewriteRule ^annons/([a-zA-Z0-9_]+)$ ad.php?ad_id=$1 [NC]
ErrorDocument 404 /404.html
This all works, except for one problem.
When I write an adress that doesn't exist like this:
http://www.domain.com/some_adress_that_doesnt_exist
then the 404.html is displayed.
BUT, if I write it like this:
http://www.domain.com/annons/some_adress_that_doesnt_exist
Notice the /annons/ doesn't actually exist, it is "created" in the rewrite-rules...
It is ONLY when I write the /annons/ and then a url that doesn't exist that the 404 doesn't work. It works with all other subdirectories and combinations, but I am guessing my rewriterule has some flaws...
Any ideas?
Thanks
BTW: By not working I mean a blank white page shows up with no information in it, as if the page existed but was completely blank.