Forum Moderators: phranque
RewriteEngine On
RewriteRule ^blog/$ /index.php [L]
RewriteRule ^blog/(.+)/(.+)/$ /index.php?p_id=$1&t=$2 [L]
RewriteRule ^ar/$ index.php?ar=yes [L]
RewriteRule ^ar/(.+)/$ index.php?ar=yes&y=$1 [L]
RewriteRule ^contact/(.+)/$ /contact/index.php?success=$1 [L]
RewriteRule ^items/$ /items/index.php?a=all&b=all&c=all&d=all&f=all [L] or should I be fixing that so it no longer works
Since you are using mod_rewrite, the 301 redirects must be expressed with RewriteRules (flag [R=301,L]). These rules go before the ones creating an internal rewrite.
RewriteEngine On
RewriteRule /index.php?p_id=$1&t=$2 ^blog/(.+)/(.+)/$ [R=301,L]
RewriteRule ^blog/(.+)/(.+)/$ /index.php?p_id=$1&t=$2 [L] It is a good idea to leave a blank line after each RewriteRule-- especially when it has conditions, so you can tell where one rule ends and another begins.
Incidentally, I hope this is not literally your entire htaccess file, even though you were right to post only the part you're asking about. Where are the ErrorDocument directives and the Deny from... lines?
RewriteRule /index.php?p_id=$1&t=$2 ^blog/(.+)/(.+)/$ [R=301,L]
RewriteRule ^blog/(.+)/(.+)/$ /index.php?p_id=$1&t=$2 [L]
RewriteCond %{QUERY_STRING} p_id=([^&]+)&t=([^&]+)
RewriteRule /index.php http://www.example.com/blog/%1/%2/$ [R=301,L] example.com/index.php?fantod=brown&willie=green&zither=blue example.com/brown/green/blue