影响根目录的子域 .htaccess 和 htpasswd 文件

subdomain .htaccess & htpasswd files affecting root directory

我已经使用 WordPress 为客户建立了一个站点。该站点建立在子域 http://staging.url.com 上。使用 Plesk,我使用密码

限制了对 'staging site' 的访问

网站完成后,我下载了 'staging site',复制了数据库并重新上传到 http://www.url.com。一切正常,除了当我登录到 wordpress 管理员时,我收到需要身份验证的弹出窗口,说 http://staging.url.com 需要用户名和密码。

我找不到任何文件可以告诉服务器 http://www.url.comhttp://staging.url.com 并提示需要身份验证弹出窗口。

有人可以帮忙吗?

非常感谢,

埃利奥特。

当前 http://staging.url.com htaccess 文件

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

AuthType Basic
AuthName "restricted area"
AuthUserFile /var/www/your-url/.htpasswd
require valid-user

当前 http://www.url.com htaccess 文件

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

我认为您的文件正在从您的暂存网站加载
转到浏览器上的检查器,检查是否有任何图像或文件正在从您在生产网站中的暂存区加载。