Now someone who knows that there exists a folder dir can write
example.com/dir/index.php access the file although it requires sid, catid, page and alphabet as a must. I want to prohibit this.
writing example.com/dir/index.php should give a notice "wrong url come thru proper redirection" but example.com/1/1/1/ should redirect to correct path without any errors. How to do this??
Using "RewriteCond" and "-f" (file exists) or "-d" (directory exists) should help you out. You may want to restrict it to certain file types because it also counts for images and such.
superdezign wrote:Using "RewriteCond" and "-f" (file exists) or "-d" (directory exists) should help you out. You may want to restrict it to certain file types because it also counts for images and such.
Can you quote a small example in what way it will be helpful. What will happen if someone write mysite.com/dir/index.php ???
kkonline wrote:
Now someone who knows that there exists a folder dir can write
example.com/dir/index.php access the file although it requires sid, catid, page and alphabet as a must. I want to prohibit this.
In index.php, compare REQUEST_URI and SCRIPT_NAME and raise an error in they match.
This doesn't free you from checking input parameters.