dave_cdv Posted October 22, 2010 Share Posted October 22, 2010 I'm looking for some advice on the best way to achieve the following... I'd like to change the way URLs are shown for our search results pages. The website is a holiday rental website and currently the URLs look like this: domain.co.uk/search?region=[value]&type=[value]&budget_low=[value]&budget_high=[value]&name=[value]&size=[value] Ultimately I'd like them to look more like this: domain.co.uk/region-value/type-value/budget_low-value/budget_high-value/name-value/size-value. Any advice would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
merylvingien Posted October 22, 2010 Share Posted October 22, 2010 You need to look into mod rewrite, the apache section has a mod rewrite sub forum Quote Link to comment Share on other sites More sharing options...
dave_cdv Posted October 22, 2010 Author Share Posted October 22, 2010 Thanks, do you think this could all be done with mod rewrite? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 22, 2010 Share Posted October 22, 2010 Thanks, do you think this could all be done with mod rewrite? yes, definitely. Quote Link to comment Share on other sites More sharing options...
plznty Posted October 23, 2010 Share Posted October 23, 2010 Something like RewriteEngine On RewriteRule ^region/([^/]*)/type/([^/]*)/budget_low/([^/]*)/budget_high/([^/]*)/name/([^/]*)/size/([^/]*)$ /search?region=$1&type=$2&budget_low=$3&budget_high=$4&name=$5&size=$6 [L] into the .htaccess file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.