DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Linux Servers and Apache (http://www.daniweb.com/forums/forum33.html)
-   -   Redirect with SOME Querystring Parameters Maintained? (http://www.daniweb.com/forums/thread197444.html)

AlexGrim Jun 14th, 2009 2:10 am
Redirect with SOME Querystring Parameters Maintained?
 
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

AlexGrim Jun 14th, 2009 3:05 am
Re: Redirect with SOME Querystring Parameters Maintained?
 
Solved:

RewriteCond %{QUERY_STRING} a=Article_Page_Display&id=(.*) [NC]
RewriteRule ^(.*)$ http://LinuxIntro.com/\?a=WCMS_Page&id=%1 [R=301]


All times are GMT -4. The time now is 7:29 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC