Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite to prevent direct URL with queries

         

bureaula

9:01 am on Jan 24, 2008 (gmt 0)

10+ Year Member



Hi all

I have a DB application on my site. Now I want to prevent people to directly submit URL's with queries such as e.g.

[domain...]

to prevent people seeing DB entries that are none of their business.
I've sucessfully applied image anti-hotlinking on the same server, so mod_rewrite works allright.
Now I've tried something simple like

RewriteEngine on
Rewritecond %{the_request} /phpimage\.php\?ID
RewriteRule - [F,NC,L]

but this has no effect. Can someone give me a clue?

jdMorgan

3:07 pm on Jan 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have a syntax error. This may work better:

RewriteEngine on
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /phpimage\.php\?ID
RewriteRule ^phpimage\.php$ - [F]

Jim