美文网首页
xiuno伪静态问题 教程在这里 !

xiuno伪静态问题 教程在这里 !

作者: 共鸣世纪 | 来源:发表于2019-07-22 16:58 被阅读0次

宝塔配置伪静态

1、第一步

Nginx 配置方法:

location ~* \.(htm)$ {

    rewrite "^(.*)/(.+?).htm(.*?)$"$1/index.php?$2.htm$3last;

}

Apache 配置方法:

RewriteEngine on

# Apache 2.4

RewriteCond %{REQUEST_FILENAME} !-d 

RewriteCond %{REQUEST_FILENAME} !-f 

RewriteRule ^(.*?)([^/]*)$ $1index.php?$2[QSA,PT,L]

# Apache other

#RewriteRule ^(.*?)([^/]*)\.htm(.*)$ $1/index.php?$2.htm$3[L]

RewriteCond %{HTTP_HOST} ^xxx.com [NC]

RewriteRule ^(.*)$ http://www.xxx.com/$1 [L,R=301]

</IfModule>

2、第二步

1.进入 网站 根目录( /www/wwwroot/www.xxxxxx.com/conf )  找到conf.php  文件  打开 编辑

2.104行:0 改为 1    保存即可

相关文章

网友评论

      本文标题:xiuno伪静态问题 教程在这里 !

      本文链接:https://www.haomeiwen.com/subject/hiiwlctx.html