I have a question in my mind that how mod_rewrite increases the security.
I have a my php file which shows a .pdf file online like www.exaple.com?id=234 and it makes a query to database and get the actual folder location.
the actual folder location is uploads/ and i am using something like how to hide the actual folder location
Now i want to use google docs
echo "<iframe src=\"http://docs.google.com/gview?url=".root."uploads/myfile.pdf"."&embedded=true\" style=\"width:100%; height:100%;\" frameborder=\"0\"></iframe>
but i don't want to show the upload directory uploads/ in this url.So i use module_rewrite to change the directory name to myfiles/ .
The question is that when user changes the directory to www.example.com/myfiles/hacking.php than it will also rewrite to uploads/hacking.php.
I am allowing user to upload files.although i am using blacklist but we assume that security holes may present