Forum Moderators: phranque
to
www.example.com/keyword/
I use this code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([^/]+)/ /query.php?q=$1 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /query.php\?q=([^&]+)\ HTTP/
RewriteRule ^query.php$ http://www.example.com/%1/? [R=301,L]
and it work. My problem is:when the url is www.example.com/query.php?q=keyword+keyword
it change to this
www.example.com/keyword+keyword/
how can I replace the"+" to "-", I have read the tutorials,and I still dont know how to do.
any help will be appreciate.Thanks.
[edited by: jdMorgan at 2:27 am (utc) on Nov. 12, 2006]
[edit reason] Example.com [/edit]
Maybe someone can think of a way the 'set a flag' or chain the rules together, but usually you need a separate ruleset for each possible number of +s EG Rule 1 = 3 pluses in query_string; Rule 2 = 2 pluses in query_string, etc.
Justin