dot htaccess 301 redirect not working

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: keith smith
Date:  
To: Main PLUG discussion list
Subject: dot htaccess 301 redirect not working

Hi,

I'm trying to configure some 301 redirects.

The old URL looks like this : www.mydomain.tld/article.php?id=1

I need it to redirect to a new URL like this www.mydomain.TLD/category-name/article-name

This Works : note I removed the ?id=1 from RewriteRule ^article\.php$

RewriteCond %{HTTP_HOST} ^mydomain\.tld$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.tld$
RewriteRule ^article\.php$ "http\:\/\/www\.mydomain\.tld\/category-name\/article-name"  [R=301,L]

This does not work - Note : RewriteRule ^article\.php?id=1$

RewriteCond %{HTTP_HOST} ^mydomain\.tld$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.tld$
RewriteRule ^article\.php?id=1$ "http\:\/\/www\mydomain\.tld\category-name\/article-name"  [R=301,L]

Thank you for any guidance.



------------------------

Keith Smith---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss