Redirect with SOME Querystring Parameters Maintained?

Thread Solved
Reply

Join Date: Sep 2008
Posts: 33
Reputation: AlexGrim is an unknown quantity at this point 
Solved Threads: 0
AlexGrim's Avatar
AlexGrim AlexGrim is offline Offline
Light Poster

Redirect with SOME Querystring Parameters Maintained?

 
0
  #1
Jun 14th, 2009
I am trying to do a Redirect with SOME Querystring Parameters Maintained. I already know how to do a redirect with ALL parameters maintained, or with NO parameters maintained, but in this particular case, i need only ONE of them dropped.

For example, my old links for my old system were something like:
http://linuxintro.com/?a=Article_Pag...d=900072752405

But now they are like this:
http://linuxintro.com/?a=WCMS_Page&id=900072752405

So i need to drop the "a" parameter, but keep the "id" parameter, so that i know which article to display.
Thanx
Last edited by AlexGrim; Jun 14th, 2009 at 2:11 am.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 33
Reputation: AlexGrim is an unknown quantity at this point 
Solved Threads: 0
AlexGrim's Avatar
AlexGrim AlexGrim is offline Offline
Light Poster

Re: Redirect with SOME Querystring Parameters Maintained?

 
0
  #2
Jun 14th, 2009
Solved:

RewriteCond %{QUERY_STRING} a=Article_Page_Display&id=(.*) [NC]
RewriteRule ^(.*)$ http://LinuxIntro.com/\?a=WCMS_Page&id=%1 [R=301]
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC