Skip to content
Advertisement

Remove query string parameter to create a more user-friendly URL

I have this .htaccess file and I have no knowledge with mod_rewrite,

JavaScript

What I want to achieve is to have localhost/viewticket/${id} instead of localhost/viewticket.php?id=123

I have tried many .htaccess rules but none worked except this one that hides .php in my URL.

Advertisement

Answer

I created this one for you, just erase yours and copy this one enjoy^^

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement