regex - SOLVED .htaccess URL Rewrite doesn't see get values -
i want rewrite url:
http://localhost/api/user/?a=xxx&b=yyy
to:
http://localhost/?controller=user&a=xxx&b=yyy
i wrote
rewriterule ^api/([a-z]*)/\\?(.*)$ ?controller=$1&$2 [l]
however doesn't see values in first link. possibility that?
when trying data queries have match path , add [qsa]
in case:
rewriterule ^api/([a-z]+)$ ./index.php?controller=$1 [qsa, l]
observe, i've added ./index.php
, replace original file want execute.
Comments
Post a Comment