The goal: To have a query string converted into a nice looking URL, which I have never gotten to work.
The details:
Change this URL:
http://www.mywebsite.com/static-directory/index.php?state=florida&city=tallahassee
to this one:
http://www.mywebsite.com/static-directory/florida/tallahassee
What I have tried: Well, just about everything. My latest search came up with this tutorial...
I have my .htaccess
file in my root directory (httpdocs).
Any help or point me at the right answered question on Stack Overflow.
Thanks.
According to the question, all is needed is to convert the 1st URL (The Request) with the query to the 2nd one without a query.
Here is a way to achieve that in one .htaccess file at root directory:
However, just in in case the OP forgot to mention the whole idea is to remove the query in order to have a "pretty" URL but still get the data from the original URL, add next 2 lines to the rule-set: