我的网站地址是
https://lofty-tibiabot.com/new/
该网站在子文件夹中-新
我希望地址为
https://lofty-tibiabot.com/new
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /new/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /new/index.php [L]
</IfModule>
# END WordPress
做什么?
答案 0 :(得分:0)
确定吗?
这有点混乱,因为Apache 需要目录中的尾斜杠才能评估DirectoryIndex
等。通过禁用尾斜杠,我们必须使用以下方法手动处理这种情况mod_rewrite。
尝试以下操作:
1) 将{1}文件移动到/new/.htaccess
的根目录中。这将/.htaccess
从WordPress中删除,因此WP无法再维护此文件(不一定是一件坏事)。
2)将.htaccess
文件更改为:
/.htaccess