Reputation: 138
My URL: example.com/epathasala/**schooldetails.php**?name=st-matthews-school
example.com/epathasala/collegedetails.php?name=gtn-arts-college
Expected URL:
example.com/epathasala/**schooldetails**/st-matthews-school
example.com/epathasala/collegedetails/gtn-arts-college
So I want to remove ?name= from the URL, Kindly Help me.
In that url query string only removed. In my case before query string also there is change.
Example Schooldetails is not static, it will change to collegedetails or events or university and so on
Upvotes: 0
Views: 205
Reputation: 33813
This might do the trick
RewriteEngine On
RewriteBase /
RewriteRule ^epathasala/schooldetails/(.*)$ /epathasala/schooldetails.php?name=$1 [NC,L]
Upvotes: 1