【发布时间】:2015-05-27 21:51:35
【问题描述】:
我有一个使用 wordpress 4.2.2 制作的网站。有时我的 .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
我在“RewriteRule ./index.php [L]”行下添加了许多 PermanentRedirect。只有这些线条消失了。
没有任何插件与 .htaccess 交互,而且消失的不是整个内容。
我不知道这个问题的根源是什么。
编辑:似乎每次有人访问永久链接设置页面时,.htaccess 都会被擦除。
【问题讨论】:
-
您在哪个平台上工作,哪个提供商正在为您提供托管服务?
标签: wordpress .htaccess mod-rewrite url-redirection