Forum Moderators: phranque
http://test.com/this-section/?Tag=other+section http://test.com/this-section/other-section RewriteCond %{QUERY_STRING} ^Tag=(.*)$ [NC]
RewriteRule (.*) ?%1 [R=301,L] http://test.com/this-section/?other+section Basically I'm trying to rewrite the following:
http://www.example.com/this-section/?Tag=other+section
To;
http://www.example.com/this-section/other-section
<snip>
RewriteCond %{QUERY_STRING} ^Tag=(.*)$ [NC]
RewriteRule (.*) ?%1 [R=301,L]
<snip>
I get the following output;
http://www.example.com/this-section/?other+section
if I place it at the end of the rewrite rule I get the whole query string added onto the URL once again.
I then want to replace / substitute all occurences of "+" with "-"
if I place it at the end of the rewrite rule I get the whole query string added onto the URL once again.
The alternative might be to use (for 3 +'s):
([^+]+)\+([^+]+)\+([^+]+)\+([^+]+)$