笺网
笺网

wordpress更换服务器nginx 配置教程ssl 先卸载Apache系统

时间:2026-11-23 03:25:24分类:热点编辑:
Nginx的换服rewrite格式和Apache的不同,

WordPress的置教Web服务器从Apache切换到了Nginx,原先的换服.htaccess文件内容如下:

  RewriteEngine On

  RewriteBase /

  RewriteRule ^index\.php$ – [L]

  RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

  RewriteCond %{ REQUEST_FILENAME} -f [OR]

  RewriteCond %{ REQUEST_FILENAME} -d

  RewriteRule ^ – [L]

  RewriteRule ^(wp-(content|admin|includes).*) $1 [L]

  RewriteRule ^(.*\.php)$ $1 [L]


还是置教会遇到一些问题,

  先卸载Apache系统,换服切换服务器后,置教对于单站点的换服WordPress来说,固定链接主要是置教通过根目录下的.htaccess文件来控制,

  WordPress

  在BT面板后台,换服其配置内容如下:

  location / {

  try_files $uri $uri/ /index.php?置教$args;

  }

  rewrite /wp-admin$ $scheme://$host$uri/ permanent;

  对于子域名方式的多站点的WordPress来说,需要修改。换服之后安装Nginx系统。置教原先的换服.htaccess文件内容如下:

  RewriteEngine On

  RewriteBase /

  RewriteRule ^index\.php$ – [L]

  RewriteCond %{ REQUEST_FILENAME} !-f

  RewriteCond %{ REQUEST_FILENAME} !-d

  RewriteRule . /index.php [L]

  切换到Nginx系统后,我们可以把这篇文章收藏起来,置教说不定某一天就用的换服上了

燃灯SEO搜索学院logo

  对于WordPress站点来说,点“网站”-“设置”-“伪静态”,

本文地址:http://obtc.3k9e.top/html/78e71999202.html

copyright © 2016 powered by 笺网   sitemap