mod_rewrite rule  rewriting  querystring to new querystring.

Posted on 2004-10-19
Last Modified: 2010-03-04
currently i have th following line in my .htaccess file and it works fine.
RewriteRule ^contact/index.php(.*)$1 [r=301,nc]

it correctly redirects

what I really want it to do is redirect

how do i do this??
Question by:cimmer
  • 2

Author Comment

ID: 12350565
LVL 19

Expert Comment

ID: 12352060
RewriteRule ^contact/index.php?id=(.*)$1 [r=301,nc]

Author Comment

ID: 12352080
i fixed it myself... this works

RewriteCond %{QUERY_STRING} id=([^&;]*)
RewriteRule ^contact/index.php$ [R=301,L]

Accepted Solution

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

Community Support Moderator

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mysql is corrupting stringified JSON object 11 53
How do Apache, PHP, and MySQL All Work Together? 6 66
ports for sccm 2012 1 74
Clearing cache in word press. 3 49
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
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). #…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

17 Experts available now in Live!

Get 1:1 Help Now