I can not comment, so I have to answer.
Reading all the answers and your question, it is not clear what you want. At least for me. You say for example:
http://localhost/DIRECTORY/AID/article.php?a_id=24 to
http://localhost/DIRECTORY/AID/article/this_is_article_title
But I think itโs not entirely right if you donโt want to
http://localhost/DIRECTORY/AID/article.php?a_id=24
to be the URL specified in the address bar of the browser, and if so, what would be the purpose of the redirect? Finally, any visitor will have to enter exactly what you do not want them to print.
I assume you want to enter a friendly URL:
http://localhost/DIRECTORY/AID/article/this_is_article_title , so the question should be the other way around:
http://localhost/DIRECTORY/AID/article/this_is_article_title TO
http://localhost/DIRECTORY/AID/article.php?a_id=24
The next thing that seems obscure is what is displayed in the browser bar? The only answer is the URL you entered. In no case can it show anything else.
In short: if you want http: // localhost / DIRECTORY / AID / article / this_is_article_title to appear in the addres bar, this is what you should enter. The real URL, REPLACEMENT ( http: //localhost/DIRECTORY/AID/article.php? A_id = 24 ), is never displayed and never entered. This is a redirect.
On the other hand, it is unclear how the ID numbers provided by news.php are expected to be converted to strings, such as article / this_is_article_title . ยฟWhere are these lines, how many identification numbers, which algorithm or formula should be used to achieve this conversion, which of these identifiers are โrootโ, as you mentioned in the comment, and how can they be identified, etc.? You should talk more about this because it seems to be improvised and inconsistent with your previous comments.
Maybe I'm wrong. I am just guessing to try and help with your question.
Please geniuses, do not subvert this answer, read it. I am not trying to answer the question, and I am really far from a genius.