且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apache 和 PHP 上的 URL 重写/Mod 重写 .htaccess

更新时间:2022-04-10 23:24:05

在 htaccess 文件中插入这段代码:

in htaccess file insert this code :

RewriteEngine On
RewriteRule ^admin/([^/]*)/([^/]*)$ /admin/index.php?View=$1&Model=$2 [L]

重写后的网址:

http://mysite.com/admin/List/User

这个站点对于生成重写 URL 非常有用

this site very useful for generate rewrite URL

http://www.generateit.net/mod-rewrite/