Removing ID's from URL's Completely

New to mod_rewrite? This is a good place to start.

Removing ID's from URL's Completely

Postby shaunie123 » Wed Feb 15, 2006 2:47 pm

Hi,

I have never done this before so I may have got this completely wrong, but basically I want to create a rule so that my URL changes from:

Code: Select all
www.mysite.com/index.php?action=cars&car_id=1&vehicle=porsche_911&office_id=3&office=uk


to:

Code: Select all
www.mysite.com/uk/cars/porsche_911


However Apache wont know that office id 3 is uk! So if somone types

Code: Select all
www.mysite.com/uk/cars/porsche_911


into their browser, how would apache know to rewrite to the correct office id etc? Do I have to rewrite my application so that I get the office name from the url rather than the id or am I missing something here?

Thanks for your advice
shaunie123
 
Posts: 15
Joined: Wed Feb 15, 2006 2:31 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 36 guests

cron