Home » Htaccess Tools » Htaccess Questions  » How to dynamic url redirect with htaccess (Need help with redirecting dynamic url with htaccess)
How to dynamic url redirect with htaccess [message #1875] Fri, 11 June 2010 11:25 Go to next message
sdbit  is currently offline sdbit
Messages: 2
Registered: June 2010
I have this:

Quote:
http://www.mysite/subfolder/index.php?action=addon_googlemap _showmap&listingID=XXX&popup=yes


where XXX is a number.

I want to redirect all
Quote:
http://www.mysite/subfolder/index.php?action=addon_googlemap _showmap&listingID=XXX&popup=yes


to

Quote:
http://www.mysite/subfolder/index.php?action=listingview& ;listingID=XXX


where XXX is a same number as in original URL.

What should I put in my htaccess file.

Thank you.
Re: How to dynamic url redirect with htaccess [message #1904 is a reply to message #1875] Wed, 07 July 2010 19:09 Go to previous messageGo to next message
HungryMind  is currently offline HungryMind
Messages: 14
Registered: July 2010
RewriteRule ^/subfolder/index.php?action=listingview&listingID=XXX http://www.mysite/subfolder/index.php?action=addon_googlemap _showmap&listingID=XXX&popup=yes

Try This Code...

Thnx & Regards: Hungry Mind
Re: How to dynamic url redirect with htaccess [message #1905 is a reply to message #1904] Wed, 07 July 2010 19:14 Go to previous messageGo to next message
sdbit  is currently offline sdbit
Messages: 2
Registered: June 2010
XXX is dynamic number, its a parameter.

I want to redirect any XXX to corresponding url, for example

want to redirect

http://www.mysite/subfolder/index.php?action=addon_googlemap _showmap&listingID=1&popup=yes


to

http://www.mysite/subfolder/index.php?action=listingview& ;listingID=1


and

http://www.mysite/subfolder/index.php?action=addon_googlemap _showmap&listingID=1524&popup=yes


to

http://www.mysite/subfolder/index.php?action=listingview& ;listingID=1524


Re: How to dynamic url redirect with htaccess [message #1907 is a reply to message #1875] Wed, 07 July 2010 19:46 Go to previous message
HungryMind  is currently offline HungryMind
Messages: 14
Registered: July 2010
Ok Check This Tutorial...

http://corz.org/serv/tricks/htaccess.php

And Download This eBook, Here U Can Find Anything About Dynamic URL's

http://www.4shared.com/file/Sdz5y44c/Wrox_Professional_Searc h_Engin.html

Thnx & Regards: Hungry Mind
Previous Topic:Rewriting for .com domain
Next Topic:How to redirect http to https EXCEPT for a subdomain
Goto Forum:
  


Current Time: Thu Sep 9 15:23:12 CEST 2010

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software