regex - Rewrite rule returning empty $_GET parameter -
continuing point this question answered,
im using rule in .htaccess file:
# internally forward /map/abc /location.php?address=abc rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^map/(.*)/?$ /location.php?address=$1 [nc,l] moving on, @ point after page has loaded, user performs facebook login redirects originating page adds authentication code:
map/פבריגט/חולון/ישראל?code=facebook_auth problem "code" parameter not passed.
i tried add rule before first rule mentioned above:
#first rule internally forward /map /location.php?address=abc&code=yxz , code rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^map/(.*)/?(.*)$ /location.php?address=$1&code=$2 [nc,l] but url:
/map/פבריגט/חולון/ישראל?code=abc the $_get array outputs
'address' => string utf-8 (18) "פבריגט/חולון/ישראל" 'code' => string (0) "" what rule should use intercept "code" parameter ? welcome. thank !
you need additional qsa flag (query string append) in rewriterule.
rewriterule ^map/(.*?)/?$ /location.php?address=$1 [nc,l,qsa]
Comments
Post a Comment