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

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

Suggested Solutions

Title # Comments Views Activity
Magento error 9 73
PHP Curl Multi-exec 13 71
Cloned web server w Apache keeps routing to old ip address.  Is problem in Apache config? 9 148
Apache / XAMPP  authorisation 10 55
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…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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