file.php/file.php

Fix it!!

file.php/file.php

Postby mevi » Thu Mar 26, 2009 11:13 pm

hello.

People are able to visit any php pages on my site, like www.mysite.com/anyfile.php/anyfile.php

But I dont want it. I just want people to visit my pages normally or with normal querystring..
like
1- www.mysite.com/anyfile.php
2- www.mysite.com/anyfile.php?id=123

how can I give 404 Error when someone tries to enter a page like www.mysite.com/anyfile.php/anyfile.php?

thanks.
mevi
 
Posts: 9
Joined: Sat Oct 20, 2007 6:36 am

Postby richardk » Fri Mar 27, 2009 1:40 am

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^([^/]+\.php)/\1$ /nonexistentfile [L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron