php - $_GET variable not passing while using an htaccess file -
this question has answer here:
i having bit of trouble not being able pass variable when i'm using htaccess file.
i have rewrite rule looks this:
rewriterule user/([0-9]+) user.php?uid=$1&user
and have small script looks this:
<?php if(isset($_get['section'])){ /*do stuff here*/ } ?> //this doesn't run
the problem i'm having if go example:
www.example.com/user/2?section=info
the 'section' part of url won't passed in.
in order parse query string in rewritten url, must pass [qsa]
(query string append) flag it, so:
rewriterule user/([0-9]+) user.php?uid=$1&user [qsa]
Comments
Post a Comment