Right now my url looks like:
http://www.mydomainname.com/city-search.php?city=Reno
and also
http://www.mydomainname.com/state-searc ... ate=Nevada
I would like to get the URLs to look nicer and friendly. Here is what I would like them to look like
http://www.mydomainname.com/city/Reno
and
http://www.mydomainname.com/state/Nevada
if anyone has some info on how to go about doing this, I think I have tried just about every example I can find, hence why I resort to having to ask a pro.
Thanks in advance
*I have been playing around with it and i can get it to work as http://www.mydomainname.com/Reno by using
- Code: Select all
Options +FollowSymLinks +MultiViews
RewriteEngine On
# Don't match existing files.
RewriteCond %{SCRIPT_FILENAME} !-f
# Don't match existing directories.
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /city-search.php?city=$1 [QSA,L]
but if I change the RewriteRule to
- Code: Select all
RewriteRule ^city/([^/]+)/?$ /city-search.php?city=$1 [QSA,L]
then it loses all the css elements of the page.. Any ideas?