I have a problem here I'v fixed a friendly url.
I am using two folders in my website one is root folder itself and another one is in 'customer' folder I have fixed in rout folder and it is working fine now in inside customer folder it is not working fine.
In my root folder I have many PHP files and it is having a search also eg:
mydomain.com/contact-us.php
mydomain.com/about-us.php
mydomain.com/business-details.php?id=1
for the above one I hv changed like this
mydomain.com/business-details/1
Now in sub folder 'customer' I have two parameter
Eg:
mydomain.com/customer/index.php?place=bangalore&business-name=business-name
I want to change it like this
mydomain.com/bangalore/business-name
is it possible? am stuck seeking kind help
You can use mod_rewrite to examine query strings as well as other parts of the URL.
If your URL always looks like your example, then you could use something like:
RewriteCond %{QUERY_STRING} ^place=([^&]+)&business-name=(.*)$
RewriteRule ^/customer/index.php /%1/%2
The RewriteCond examines the query string and picks out the place and business name, putting them in variables. Then the RewriteRule rewrite the URL according to what you say you want.