Forum Moderators: coopster
[edited by: rocknbil at 5:26 pm (utc) on Mar 1, 2011]
Is "newsite" a new domain or is it a directory on the current domain? If it's on the current domain, you don't need the full url.
/articles/why_drink_smoothie.php
Be sure to add the R=301, NC, and L flags for case-insensitivity and to make sure the rule stops here (L= last rule to process.) Rules following it may be taking over. All together,
RewriteRule ^articles/articles\.php\?article=why_drink_a_smoothie$ /articles/why_drink_smoothie.php [R=301,NC,L]
QUERY_STRING. RewriteCond %{QUERY_STRING} ^article=why_drink_a_smoothie [NC]
RewriteRule ^articles/articles\.php http://www.example.com/articles/why_drink_smoothie.php [R=301,NC,L] Then when "/articles/why-drink-a-smoothie" comes in, it would be processed like so
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /your-script.php?q=$1 [L,QSA]
where "articles/why-drink-a-smoothie" is passed to your-script.php as a query string you parse out and product the page.
RewriteRule ^([^.]+)$ /your-script.php?q=$1 [L,QSA]