mod_rewrite rule rewriting querystring to new querystring.

currently i have th following line in my .htaccess file and it works fine.
RewriteRule ^contact/index.php(.*) http://www.website.com/att/att_profile.php$1 [r=301,nc]

it correctly redirects
http://www.website.com/contact/index.php?id=5
to
http://www.website.com/att/att_profile.php?id=5


what I really want it to do is redirect
http://www.website.com/contact/index.php?id=5
to
http://www.website.com/att/att_profile.php?member=5

how do i do this??
cimmerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
moduloConnect With a Mentor Commented:
PAQed with points refunded (401)

modulo
Community Support Moderator
0
 
ramazanyichCommented:
RewriteRule ^contact/index.php?id=(.*) http://www.website.com/att/att_profile.php?member=$1 [r=301,nc]
0
 
cimmerAuthor Commented:
i fixed it myself... this works

RewriteCond %{QUERY_STRING} id=([^&;]*)
RewriteRule ^contact/index.php$  http://www.website.com/att/att_profile.php?member=%1 [R=301,L]
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.