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

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -