Here are my current rules:
RewriteCond %{QUERY_STRING} ^to=(one|seventeen|thirty\+four)
RewriteRule ^/folder/page.php$ http://www.site.com/folder/category/%1? [L]
RewriteRule ^folder/category/(.+)\+(.+)$ http://www.site.com/folder/category/$1-$2 [L]
The first rule works fine, it redirects perfectly if the word is in the query string, but I can’t get thirty+four to become thirty-four when redirected.
Any help would be greatly appreciated.
For starters,
RewriteRule ^/folder/page.php$will never match anything. The URI’s get the prefix (the leading slash) removed if the rules are in an .htaccess file instead of server config.Secondly, since you’ve included
http://www.site.com/in your targets, that means the browser will get redirected instead of internally rewritten. You need to removehttp://www.site.com/from your first rule so that the second one can be applied.