为什么从URL末尾删除/给我一个403?

时间:2017-08-19 23:18:17

标签: php wordpress http-status-code-403

您好我最近在我的localhost上编写了Wordpress上的店面子主题,并使用免费版的Duplicator将其移动到我的网站服务器进行演示。该网站在此网址上运行正常:http://connorperzely.com/advancedpowereq.com/

但是,当我尝试将其加载到相同的URL而没有尾随" /"它返回403:http://connorperzely.com/advancedpowereq.com

为什么在从URL末尾删除/时会发生403?我该如何修复它以便它能正常工作?

这是我的.htaccess:

# This file was updated by Duplicator on 2017-08-18 23:29:51. See .htaccess.orig for the original .htaccess file.
# Please note that other plugins and resources write to this file. If the time-stamp above is different
# than the current time-stamp on the file system then another resource has updated this file.
# Duplicator only writes to this file once during the install process while running the installer.php file.

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

# END WordPress

1 个答案:

答案 0 :(得分:1)

根据您的.htaccess文件,它正在按预期工作。

网址:http://connorperzely.com/advancedpowereq.com结束ID .com因此它被识别为文件和行 <{1}}未到达。

不建议您在子域中使用点,并且RewriteRule . /advancedpowereq.com/index.php [L]将能够流畅地工作