@define(\'ADMIN_COOKIE_PATH\', \'/\');
把这个放在
wp-config.php
允许我登录。不确定这是否是设置所有内容的正确方法,但它确实有效。。。
EDIT
这只解决了一半的问题。Permalinks随后被打破。
@托肖向任何可能看到这一点并有类似问题的人提出了适当的建议。
然而,这个托管提供商不允许虚拟主机,所以如果你处于类似的情况下,最终对我有用的是更多。htaccess线路(见下文)与wp-config
上述修改。
# .htaccess main domain to subdirectory redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
# Change \'subdirectory\' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don\'t change these line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change \'subdirectory\' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change example.com to be your main domain again.
# Change \'subdirectory\' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ subdirectory/index.php [L]