I need serious and urgent help to address bar of website

Hello every one, Sirs and Madams,

Currently I am working for my own website to post all the learning from freecodecamp. I almost make the framework.
I use a little of php, mysql, javascript, html and css (which I am still learning in freecodecamp)
While clicking on the link to get articles or projects. my url looks like

 /example.php?id=25
 /example.php?id=26
 /example.php?id=27

I am able to remove the .php from the address bar and now looks like.

 /example?id=25
 /example?id=26
 /example?id=27

I used .htaccess to change this. But I want to remove ?id=25, and instead i wish to put there the subject of the page.
For Example:

/example?id=25 should be example/24-hover-effects-that-may-very-useful

Please, advice me.
Thank you very much

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

Great resource talking about setting up redirects like this via .htaccess, https://gist.github.com/ScottPhillips/1721489

However, have you set up your PHP to handle request urls like this?

@snowmonkey Thank you. But no i am still not able to do this. What I did till now is just able to remove the .php extension from the url.
For example. www.example.com/news.php – I remove .php and now only www.example.com/news works perfectly.
My problem is in the main page, where I display data from mysqli.
Before the url was:
https://example.com/display.php?id=35
I am able to change it
https://example.com/display?id=35.

Now I want to change it even:

https://example.com/display/this is heading.

Whatever, the link you send me seems very good. But its mid night in London now, so I am going to finish my Black and White Fan project, and tomorrow morning I will study the link you have given.

Thank you very much… Your suggestion is really really great.