How to write htaccess rewrite rules
I am using the following htaccess code for rewrite my url
site.com/page.php?id=1 to site.com/page/1.
RewriteEngine On
RewriteRule ^page/(.*) page.php?id=$1 [L]
If i add 8 rewrite rules to the main htaccess file , it may increase
increase execution time.So i am planing to create directories like page
and place a new htaccess files to it.
RewriteEngine On
RewriteRule (.*) index.php?id=$1 [L]
But this code doesn't works.
No comments:
Post a Comment