We need to send a 404 return code error for a specific URL on our site. (required because a client complains the URL is still in google, despite the content not existing).
The issue is tricky because the URL contains special characters that Apache appears not to want to exist in our htaccess file:
If mod_rewrite objects escape the <'s with \ for [^\<] and that’ll do the trick.
You just have to remember that Apache IS smart enough to know what the encoded character is but mod_rewrite’s NOT very accommodating to encoded characters so you MUST use the character within a character range definition.
I have no idea how Google got this URL in its index.
Thanks for the suggestions. I knew some escaping was probably required, but everything I attempted was causing server errors.
So your suggestion stopped the server errors. But Apache appears to be ignoring the rewrite rule. The web server is still returning a 200 code. (which is what has been doing all day regardless of what I try)