86Stang Posted December 22, 2009 Share Posted December 22, 2009 I've got a project where the client wants their visitors to select a city and state. Easy. They want the visitor to go to a URL based on that selection. They are pretty adamant that the URL looks like www.example.com/WA/Seattle. Easy. They want to use the same page layout on the resulting page regardless of which city and state they pick but the info will be specific to that city. I don't want to create 50 folders with untold thousands of identical files to account for each city. So, is there a way to send them to the URL as requested above but use the same .php script? Link to comment https://forums.phpfreaks.com/topic/186045-url-manipulation/ Share on other sites More sharing options...
rajivgonsalves Posted December 22, 2009 Share Posted December 22, 2009 have you tried out mod_rewrite ? http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html Link to comment https://forums.phpfreaks.com/topic/186045-url-manipulation/#findComment-982470 Share on other sites More sharing options...
Buddski Posted December 22, 2009 Share Posted December 22, 2009 mod_rewrite in your .htaccess should do the trick.. http://corz.org/serv/tricks/htaccess2.php This helped me alot.. Link to comment https://forums.phpfreaks.com/topic/186045-url-manipulation/#findComment-982471 Share on other sites More sharing options...
86Stang Posted December 22, 2009 Author Share Posted December 22, 2009 Sweet! I didn't have a clue that mod_rewrite could do that sort of thing. Oops! my ineptness is showing again, isn't it?! Link to comment https://forums.phpfreaks.com/topic/186045-url-manipulation/#findComment-982489 Share on other sites More sharing options...
Buddski Posted December 22, 2009 Share Posted December 22, 2009 Its just a learning curve.. Link to comment https://forums.phpfreaks.com/topic/186045-url-manipulation/#findComment-982495 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.