URL Rewrite/Mod Rewrite .htaccess on Apache and PHP -
i have single point of entry on website
mysite.com/admin/index.php?view=list&model=user
all access db/application through index.php file.
i clean url shown above to.
mysite.com/admin/list/user
the thought remove key 'model , 'view'.
i have found link looks similar.
php/apache: rewrite rules .htaccess
in htaccess file insert code :
rewriteengine on rewriterule ^admin/([^/]*)/([^/]*)$ /admin/index.php?view=$1&model=$2 [l]
the rewritten url:
http://mysite.com/admin/list/user
this site useful generate rewrite url
http://www.generateit.net/mod-rewrite/
php apache url-rewriting
No comments:
Post a Comment