?
Solved

mod_rewrite rule  rewriting  querystring to new querystring.

Posted on 2004-10-19
5
Medium Priority
?
146 Views
Last Modified: 2010-03-04
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??
0
Comment
Question by:cimmer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12352060
RewriteRule ^contact/index.php?id=(.*) http://www.website.com/att/att_profile.php?member=$1 [r=301,nc]
0
 

Author Comment

by:cimmer
ID: 12352080
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
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12582154
PAQed with points refunded (401)

modulo
Community Support Moderator
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question