Solved

mod_rewrite rule  rewriting  querystring to new querystring.

Posted on 2004-10-19
5
142 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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