Produke,
You basically got it.
I needed your tag-specific suggestion but a straight copy&paste gave:
Code:
url: http://mysite.com/blog/index.php?tag=example
Moved Permanently
The document has moved here.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.54 Server at mysite.com Port 80
So I added an [L] to the last line:
Code:
RewriteRule ^blog/index\.php(.*) /index.php%{QUERY_STRING} [R=301,NC,QSA,L]
That resulted in the desired redirect but the url was being rewritten incorrectly as:
http://mysite.com/index.phptag=example?tag=exampleSo there seemed to be a redundant query string call. What worked was:
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^.*tag.*$
RewriteRule ^blog/index\.php(.*) /index.php [R=301,NC,QSA,L]
Thanks alot! I really appreciate it. On topic - what would you say is the best way to design & test rewriterules? Any specific tool recommendations to speed things up?