Home Loan - MPAA - Cheap Flights - Mortgage News - eHarmony

PDA

View Full Version : Help with mode rewrite for 2 dynamic urls


youngpatriot
Aug 8th 2006, 11:28 am
Hi, I've been puzzling over this all morning, can anyone give me a hand?

I've got 2 dynamic urls that need to display static:

www.mydomain.com/listings.php?state=DE&city=Bear needs to show www.mydomain.com/DE/Bear.php

and

www.mydomain.com/selectcity.php?state=DE needs to show www.mydomain.com/DE/selectcity.php

Thanks a bunch, my head is about to explode!

David

youngpatriot
Aug 8th 2006, 12:02 pm
Of course I meant mod_rewrite in the subject, sorry.

Cryogenius
Aug 9th 2006, 5:34 am
Here's a simple solution to your problem:


RewriteRule (.*)/$ selectcity.php?state=$1
RewriteRule (.*)/(.*).php$ listings.php?state=$1&city=$2

Hope it helps,

Cryo.

neerajkhichi
Aug 31st 2006, 3:07 pm
Hi, I've been puzzling over this all morning, can anyone give me a hand?:o

I've got 2 dynamic urls that need to display static:

http://www.mydomain.com/?page=home needs to show http://www.mydomain.com/

and

http://www.mydomain.com/?page=sys needs to show http://www.mydomain.com/sys.html

Thanks a bunch, my head is about to explode!

Neeraj Khichi

Plz. Let me Know About it as soon as.