在实时服务器上,要在尝试访问任何页面时解决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
已安装