关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

微擎设置伪静态规则(IIS ,Nginx,Apache)

发布时间:2022/1/10 9:27:54
香港云服务器

微擎的伪静态规则

apache规则
RewriteEngine On 
RewriteBase / 
RewriteRule ^([0-9]+)-([0-9]+).html$            /app/index.php?i=$1&a=webapp&c=entry&eid=$2%1 [L,QSA]
RewriteRule ^([0-9]+)/$				            /app/index.php?i=$1&a=webapp&c=entry&do=index&m=fy_lessonv2 [L,QSA]
RewriteRule ^([0-9]+)/([0-9a-zA-Z]+).html$	    /app/index.php?i=$1&a=webapp&c=entry&do=$2&m=fy_lessonv2 [L,QSA]
IIS如果安装了url重写模块,可以通过重写模块导入上面的规则,
IIS如果安装了isapi-rewirte软件,找到软件路径,修改httpd.conf ,添加上面的即可

image.png

Nginx,比较简单,如果安装了宝塔,通过站点的伪静态规则添加即可

image.png

rewrite ^/([0-9]+)-([0-9]+).html$ /app/index.php?i=$1&a=webapp&c=entry&eid=$2;
rewrite ^/([0-9]+)/$ /app/index.php?i=$1&a=webapp&c=entry&do=index&m=fy_lessonv2;
rewrite ^/([0-9]+)/([a-zA-Z]+).html$ /app/index.php?i=$1&a=webapp&c=entry&do=$2&m=fy_lessonv2;