- Joined
 - Dec 17, 2015
 
- Messages
 - 31
 
- Likes
 - 25
 
- Degree
 - 0
 
I'm hoping some kind-hearted whiz can help me out. I have an old website i built running off a database of towns and cities generating listings. When I built it using my limited php knowledge I hacked it together simply passing the variables through the url. I want to fix the site up now including pretty URL's. Ive run it through an online htaccess generator which has given me the following but my problem is I have hundreds of URL's indexed already. Can anyone give me some help adding some code to 301 the old URL's the the new ones or point me to a similar tool which will help?
Thanks
Code
RewriteEngine On
RewriteRule ^united-kingdom/keyword/([^/]*)/([^/]*)/$ /united-kingdom/keyword.php?state=$1&state_id=$2 [L]
RewriteRule ^united-kingdom/keyword/([^/]*)/([^/]*)/([^/]*)/$ /united-kingdom/keyword-in.php?city=$1&state_id=$2&state=$3 [L]
				
			Thanks
Code
RewriteEngine On
RewriteRule ^united-kingdom/keyword/([^/]*)/([^/]*)/$ /united-kingdom/keyword.php?state=$1&state_id=$2 [L]
RewriteRule ^united-kingdom/keyword/([^/]*)/([^/]*)/([^/]*)/$ /united-kingdom/keyword-in.php?city=$1&state_id=$2&state=$3 [L]
