URLOS一键安装dedeCMS(织梦cms)如何设置伪静态

一键安装织梦CMS

ssh连接主机后,使用如下代码进行安装:

mkdir -p /data/urlos/tmp && cat > /data/urlos/tmp/websiteInitData.json <<-EOF
{
"domains": "请修改为你的域名",
"ports": "80 8080",
"appId": 65,
"nodeId": 1,
"dbPassword": "这里设置数据库密码",
"sftpPassword": "这里设置SFTP密码",
"otherDatas": {"description": "myWebsite"}
}
EOF
curl -O https://www.urlos.com/siu && sh siu

设置伪静态

首先在织梦cms后台开启伪静态功能,然后访问http://你的主机IP:9968登录URLOS面板,修改并部署织梦cms,在nginx配置中的伪静态项目中填写如下内容:

rewrite "^/list-([0-9]+).html$" /plus/list.php?tid=$1 last;
rewrite "^/list-([0-9]+)-([0-9]+)-([0-9]+).html$" /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite "^/view-([0-9]+)-1.html$" /plus/view.php?arcID=$1 last;
rewrite "^/view-([0-9]+)-([0-9]+).html$" /plus/view.php?aid=$1&pageno=$2 last;
rewrite "^/plus/list-([0-9]+).html$" /plus/list.php?tid=$1 last;
rewrite "^/plus/list-([0-9]+)-([0-9]+)-([0-9]+).html$" /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite "^/plus/view-([0-9]+)-1.html$" /plus/view.php?arcID=$1 last;
rewrite "^/plus/view-([0-9]+)-([0-9]+).html$" /plus/view.php?aid=$1&pageno=$2 last;
rewrite "^/tags.html$" /tags.php last;
rewrite "^/tag-([0-9]+)-([0-9]+).html$" /tags.php?/$1/$2/ last;

20200604161245414
点击提交即可!

使用URLOS安装的织梦cms,配置伪静态的方法就这么简单,你学会了吗?
更多好应用尽在URLOS

没有账号? 忘记密码?

社交账号快速登录