.htaccess - Rewrite QSA, understanding it better -


so, i'm having difficult time understanding qsa. since

rewriterule ^search/(.*)$ search.php?s=$1 [nc,l,b,qsa] rewriterule ^search/(.*)$ search.php?s=$1 [nc,l,b] 

both give me same result. read qsa appends parameters passed (at least think that's understood it). it's not working me.

currently have url

http://localhost:8888/search/hey+i%27m+a+search+query&sortby=day 

which returns

hey i'm search query&sortby=day 

i can set

rewriterule ^search/(.*)&sortby=(.*)$ search.php?s=$1&sortby=$2 [nc,l,b,qsa] 

which return parameter, understand qsa, should automatically handled...right?

i got information here - what $1 [qsa,l] mean in .htaccess file?

basically, question is, why should use qsa? , kind of benefits provide in situation? (sorry being blunt, can't grasp of this)

the problem example url has no query string. use ? designate query string:

http://localhost:8888/search/hey+i%27m+a+search+query?sortby=day 

the ?sortby=day automatically appended rewritten query string through qsa flag.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -