Wordpress永久链接不起作用 - Apache配置重置

时间:2015-05-15 10:07:56

标签: php wordpress apache .htaccess

在实时服务器上,要在尝试访问任何页面时解决404错误,请在httpd.conf

中更改以下设置
<Directory "/usr/local/apache/htdocs">
    Options Includes Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

但是第二天它会重置到

以下
<Directory "/usr/local/apache/htdocs">
    Options Includes Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

真的希望它会起作用,但不会去。这是我更改永久链接选项后.htaccess的样子:

<Directory />
 Options +FollowSymLinks
 AllowOverride All
</Directory>

<Files .htaccess>
order allow,deny
deny from all
</Files>

# 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

页面仍然无法访问。将AllowOverride None更改为AllowOverride All有效,但会以某种方式再次重置为默认设置。

即使在更改httpd.conf.htaccess后,也会出现

404找不到页面错误。

注意:mod_rewrite已安装

0 个答案:

没有答案