Hi, I have good expertise with php but new to url rewriting. I need some help creating some static urls for database driven US states' pages. what I need to do is... alabama.html should be dealers.php?state=alabama likewise new-jersey.html should be dealers.php?state=new jersey Any help would be highly appreciated. Thanks
When I first started, I used this tool to get acclimated to url mod_rewrite: http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml Hopefully that helps you! I noticed though, you will have an issue substituting the space (%20) in words like new jersey for '-'. Probably won't be able to do that.
RewriteEngine on Options +FollowSymLinks RewriteRule ^(.*)\.html$ dealers.php?state=$1 PHP: You cant really do new-jersey.html unless the state is new-jersey