URL rewriting almost done
Posted: Thu Feb 10, 2011 5:12 am
I am pretty new to url rewriting,
My url structure is like this http://www.site.com/index.php?section=news&id=30
and I need it to be http://www.site.com/news/30/
I have written down this .htaccess file,
It works, but the external files the page uses like .css/.js/images/favicon are not loaded!
My url structure is like this http://www.site.com/index.php?section=news&id=30
and I need it to be http://www.site.com/news/30/
I have written down this .htaccess file,
Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)/(.*)/(.*) /index.php?section=$1&id=$2 [QSA]
RewriteRule ^(.*)/(.*) /index.php?section=$1&id=$2 [QSA]
RewriteRule ^(.*)/ /index.php?section=$1 [QSA]