Mod_rewrite: using just one variable from query string and append it
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Web Servers on Unix and Linux > Mod_rewrite: using just one variable from query string and append it




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Mod_rewrite: using just one variable from query string and append it  
Tom


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-29-04 10:49 PM

I've got a problem with mod_rewrite and rewriting key-value pairs.

Some pages link to my page in an abandoned format, like this:
www.url.com/abandoned.cgi?Key1=Val1&Key2=Val2&Key3=Val3

this has to be translated to: (transparent, with external redirect
[R])
www.url.com/new.cgi?Key2=Val2

I need to rewrite only URLs that contain "abandoned.cgi" and have to
get rid of Key1 and Key3.

After studying numerous mod_rewrite threads and tutorials my question:
do i need a RewriteCond to handle this? "[QSA]" or not? Do I need
"[NE]"? How can this be done?

I've tried a lot! Never got it to work correctly. Most of the time the
the values disappeared. I only managed to get the whole query string
over to the new URL but never to extract just this Key2-bit

I'm stuck. Thanks for any hints





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:47 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register