猜一猜:祖先所称的“照夜清”指的是哪一种虫豸?蚂蚁庄园4.23日谜底

知识 382℃

WordPress的换处Web处事器从Apache切换到了Nginx  ,仍是事器x设会碰着一些问题 ,我们可以把这篇文章收躲起来,置设置教说不定某一天就用的备放上了

燃灯SEO搜刮学院logo

  对WordPress站点来讲,结实链接主假定经由过程根目次下的换处.htaccess文件来独霸 ,切换处事器后,事器x设Nginx的置设置教rewrite格式和Apache的不合 ,需求改削。备放

  先卸载Apache琐细 ,换处此后拆卸Nginx琐细 。事器x设

  WordPress

  在BT面板布景,置设置教点“网站”-“设置”-“伪静态” ,备放对单站点的换处WordPress来讲 ,本来的事器x设.htaccess文件内容以下 :

  RewriteEngine On

  RewriteBase /

  RewriteRule ^index\.php$ – [L]

  RewriteCond %{ REQUEST_FILENAME} !-f

  RewriteCond %{ REQUEST_FILENAME} !-d

  RewriteRule . /index.php [L]

  切换到Nginx琐细后,其设置设备放置内容以下 :

  location / {

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

  }

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

  对子域名编制的多站点的WordPress来讲 ,本来的.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]