Hi Everyone,

My htaccess isn't account for spaces with certain keywords. I'm not sure why because I thought my syntax was correct but it turns out it's wrong.

A URL like this one on my website is working. It's working because there are no spaces in between keywords.
http://mysite.com/florida/orlando/2006/ford/explorer

A URL like this on my website is working but I don't want the %20 in between any keywords.
http://mysite.com/florida/key%20west/2005/ford/explorer

My goal is to take the second above URL (the one with a space) and make it look like this below URL
http://mysite.com/florida/key_west/2005/ford/explorer

or take a URL like this
http://mysite.com/rhode%20island/cra.../ford/explorer

and turn it into this
http://mysite.com/rhode_island/crans.../ford/explorer

How would I do that?

My .htaccess code is below.

Code:
RewriteEngine On
RewriteRule ^([_a-zA-Z_]+)$ state.php?state=$1 [L]
RewriteRule ^([_a-zA-Z_]+)/([_a-zA-Z_]+)$ city.php?state=$1&city=$2 [L]
# RewriteRule ^([_a-zA-Z_]+)/([_a-zA-Z_]+)/([_a-zA-Z_]+)/([_a-zA-Z_]+)/([_a-zA-Z_]+)$ make-model.php?state=$1&city=$2&year=$3&make=$4&model=$5 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /make-model.php?state=$1&city=$2&year=$3&make=$4&model=$5 [L]
Thanks everyone!