I have an website where in the homepage are displayed multiple articles. Every article has a link and when I click on it I pass the Id, the date and the title as parameters through the URL to "article.php" page. When I'm on the article page I recognize which article is by the Id and then I display the content.
But my problem is: when I open the "article.php" page my URL looks like this
http://127.0.0.1/Andrea/mySite/article.php?id=21&date=02%20march%202017%title=Basket%20NBA:%20Bulls-Warriors.%20Analysis
I have created the .htaccess file and I'm able to redirect people to other pages so the rewrite is enabled, what I'm searching is to change the URL from the above to something like this
http://127.0.0.1/Andrea/mySite/2017/03/02/basket-nba-bulls-warriors
So I want to remove the "Analysis" part after the point and "article.php" from the URL, the date to switch like if it was folders and the title to be written with scores between the words.
I have tried
RewriteEngine on
RewriteRule ^id/([A-Za-z0-9-]+)/?$ article.php?id=$1 [NC]
To remove "article.php" and add id between slashes but it doesn't seem to work.
Thanks in advice to everyone who will help me.