Solved

mod_rewrite rule  rewriting  querystring to new querystring.

Posted on 2004-10-19
5
139 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
  • 2
5 Comments
 

Author Comment

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now