.htaccess - Question mark in htaccess -



.htaccess - Question mark in htaccess -

i'm trying create search results url google.

site.com/search?q=blabla

tried this

rewriterule ^search\?q=(.*)$ index.php?q=$1

i used \ before ? still doesn't work, question mark makes problem. right way that?

you need simple rule in root .htaccess:

rewriteengine on rewritebase / rewriterule ^search/?$ index.php [l,qsa,nc]

query string ?q=foobar automatically carried on index.php.

.htaccess

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -