Hey guys - I'm having problems rewriting some dynamic URLs on my website. Bear with me as I'm not a programmer. I want to re-direct http://www.citydreamhomes.com/search.php?location1=1 to: http://www.citydreamhomes.com/downtown-toronto-homes.html Here's my .htacess file RewriteEngine ON #RewriteRule ^product/([^/\.]+)/?$ product.php?id=$1 [L] RewriteRule ^(.*)/downtown_toronto_homes/$ $1/search.php?location1=1 It doesn't seem to be working, and although my hosting company says that mod_rewrite is enabled, is doesn't show as loaded in the phpinfo file. Any help would be highly appreciated!
Anyone? I will pay $5 by PayPal to anyone who can tell me what`s wrong with: RewriteEngine on RewriteRule ^(.*)/downtown_toronto_homes\.html$ $1/search.php?location1=1
Try this RewriteRule ^/(.*)\.html$ /search.php?location1=$1 The above will redirect http://www.citydreamhomes.com/downtown_toronto_homes.html to http://www.citydreamhomes.com/search.php?location1=downtown_toronto_homes http://www.citydreamhomes.com/north_york_homes.html to http://www.citydreamhomes.com/search.php?location1=north_york_homes You need to change search.php, to accept instead of numbers, 1 or 5 etc, to accept downtown_toronto_homes or north_york_homes. Actually this will simplify the code in search.php as well. I don't need the $5, I will be glad if the above solution works for you.