.htaccess - Htaccess redirect url with raw php url containing variables -


i'm using cms rewrites urls , have url this:

http://www.domain.com/folder/?user=user1 

i'm looking have rewrite to: index.php?r=search&term=$1

would work?

rewriterule ^/?user=(.*) index.php?r=search&term=$1 [l] 

seems giving me trouble. suggestions?

the query string not part of uri-path test in rule. @ query_string variable.

you may try this:

options +followsymlinks -multiviews rewriteengine on rewritebase / rewritecond %{query_string} user=([^/]+)/?  [nc] rewriterule ^folder/?  /index.php?r=search&term=%1  [l,nc] 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -