I need to perform these two changes using .htaccess: 1) I'm currently using urls like this: domain.com/state.php?state=CA (the CA is being used to pull other information from the DB) What I'd like to do is show the url as: domain.com/California 2) I'm currently using urls like this: domain.com/state2.php?city=Los Angeles&state=CA (the CA and Los Angeles are being used to pull other information from the DB) What I'd like to do is show the url as: domain.com/California/Los Angeles Note: Currently using $_GET to retrieve city and state from the URL and this function needs to remain in tact. Not sure if this is doable. I need this to be automated as there are too many city/state combinations.
Have in mind that if you do this in htaccess, any requested url will be considered as a state, i'd suggest do /state/<name> Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteRule ^state/([^/]+) state.php?state=$1 [QSA]