Forum Moderators: phranque
Let say if i type
www.example.com
or
www.example.com/anything=?
or any other parameter after "/"
and same is with dynamic script
www.example.com/myscript/post=1
or
www.example.com/mysript/post=1?anyparameter
i there any way to produce 404 error when any extra string is typed in url. and how can i go for it>>?
Thanks for ur time.
The critical factor here is whether your site (or your control panel, stats program, or domain manager, etc.) actually uses any query strings. If not, then the code is simple. But if you do use *some* query strings, then either the mod_rewrite code must contain the logic (the "knowledge") needed to determine a valid versus invalid query string, or you must pass all query strings to your script, let it determine whether the query is valid, and if not, generate a 301 (or 404) server response.
Jim