.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

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -