I want to make my URL clean. Below is what I want to do:
Dirty URL: www.site.com/index.php?page=products
Clean URL: www.site.com/products/
For this, I write these codes in .htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^([^/]*)/$ /index.php?page=$1
But whenever I click on the links in my project, I redirect to localhost
page. Links are in this form:
<a href="products">Products</a>
I think it may be related to href
value.
What's the correct form for href
value? href="product"
,href="/product/"
,etc. ?