栏目目录1CSM模板开发文档
伪静态

Apache伪静态(.htaccess文件)
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]Nginx伪静态(如不使用伪静态,则需开启pathinfo才能安装):
location /
{
try_files $uri $uri/ /index.php?$args;
}或者
location /{
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
}
}Nginx子目录伪静态:
location /test/ {
if (!-e $request_filename) {
rewrite . /test/index.php last;
}
}DISCUSSION / 读者回应
把你的经验也留下
评论会先进入审核队列;通过后才会公开显示。邮箱不会公开展示。
还没有评论