Wordpress 403 subdir安装中禁止的错误

Wordpress 403 subdir安装中禁止的错误,wordpress,http-status-code-403,Wordpress,Http Status Code 403,我将Wordpress安装在一个公共的html子目录中,比如说/Wordpress/。 在public\u html root/中没有索引文件。 在wordpress管理页面中,我设置了以下内容: WordPress Address (URL): https://example.org/wordpress/ Site Address (URL): https://example.org/ 在public_html根目录中而不是在subdir/wordpress/中生成.htaccess的: 这

我将Wordpress安装在一个公共的html子目录中,比如说/Wordpress/。 在public\u html root/中没有索引文件。 在wordpress管理页面中,我设置了以下内容:

WordPress Address (URL): https://example.org/wordpress/
Site Address (URL): https://example.org/
在public_html根目录中而不是在subdir/wordpress/中生成.htaccess的:

这是不正确的:它不会重定向到右子目录,因此我将其修改为:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
现在它似乎起作用了:当我去https://example.org 我看到链接中没有/wordpress/的wordpress站点

人类有一个看不见的问题:如果我检查https头响应,我会得到一个403禁止的错误,可能与根目录中缺少索引文件有关

这会阻止搜索引擎蜘蛛

如果有任何想法,我们都会非常感激, 提前谢谢大家,,
吉尔

我认为你的情况与此相同

你可以从wordpress中找到答案。

根据@Nugie的建议,解决方案是:

将index.php从/wordpress/复制到public\u html根目录 修改root中的index.php,如下所示: 发件人:

致:

现在到403禁止的错误消失了

谢谢你@Nugie

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
require __DIR__ . '/wp-blog-header.php';
require __DIR__ . '/wordpress/wp-blog-header.php';