我将Wordpress安装在根文件夹和landing.html文件中,我想成为我博客的首页。我的.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
当我在DirectoryIndex landing.html
行RewriteBase /
作为首页添加landing.html
后,index.php
也会重定向到它。
答案 0 :(得分:0)
除了DirectoryIndex
之外,请在RewriteBase
行下方尝试此规则:
DirectoryIndex landing.html index.php
RewriteRule ^$ /landing.html [L]
你最有可能也可以通过你的WP主题来做到这一点。
您的WP永久链接设置也可能需要相应更改。