目前我一直使用Apache,但也许您应该设置常量COOKIE_DOMAIN
设置为空值。否则WordPress将始终将其设置为您网络的$current_site->domain
您将无法登录任何其他网站。
define(\'COOKIE_DOMAIN\', \'\');
the
www
关于域就像一个子域,困惑而无益。也许您将安装设置为没有
www
或将规则添加到
.htaccess
所有地址都将使用
www
, 如以下来源。
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
还有一个关于WordPress上子域nginx配置的提示。但我没有测试,只有发现
in this post.
server {
##DM - uncomment following line for domain mapping
#listen 80 default_server;
server_name example.com *.example.com ;
##DM - uncomment following line for domain mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args ;
}
location ~ \\.php$ {
try_files $uri /index.php;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location ~* ^.+\\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
}
location = /robots.txt { access_log off; log_not_found off; }
location ~ /\\. { deny all; access_log off; log_not_found off; }
}