0

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

3
  • Did you try existing answers such as stackoverflow.com/a/9310224/3749523 ? Did it help you? Commented Jul 22, 2015 at 9:56
  • possible duplicate of Pretty URL - mod_rewrite question Commented Jul 22, 2015 at 10:18
  • Yes I have tried but its not working in my case Commented Jul 22, 2015 at 10:24

1 Answer 1

1

This might do the trick

RewriteEngine On
RewriteBase /
RewriteRule ^epathasala/schooldetails/(.*)$ /epathasala/schooldetails.php?name=$1 [NC,L]
Sign up to request clarification or add additional context in comments.

1 Comment

RamRaider Thanks, , But schooldetails is not permanent, its a dynamic value it may change to collegedetails.php or events.php or university.php and so on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.