I want to write <a href="product.php?id=5">as product/5.I am not talking about user to type doamin.com/product/5 to get the result, what I am looking for is- when user click the link, the browser address bar will show the url as domain.com/product/5.
Is it possible?Any help would be greatly appreciated.Thanks in advance.
Just write:
What you also need is a .htaccess file, that handles mod_rewrite, for example:
With you’ll get a $_GET[‘_route’] which’s value will be /product/5. The rest is up to your php code to parse that string.