Мой сервер был недавно скомпрометирован. Я переместил все на новый сервер, но по некоторым причинам постоянные ссылки на сайт Wordpress работают некорректно. Я просмотрел все, и все кажется правильным, но я не понимаю, почему ссылки не будут работать, когда все настройки будут скопированы со старого сервера, на котором все они работали.Wordpress Permalinks Не работает на новом сервере
.conf Сервер:
<VirtualHost *:80>
ServerName www.XXX.com
ServerAdmin [email protected]
DocumentRoot /var/www/html/XXX.com/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
<VirtualHost *:80>
ServerAlias XXX.com
ServerAdmin XXX
DocumentRoot /var/www/html/XXX.com/
ServerName www.XXX.com
DirectoryIndex index.html index.php
<Directory "/var/www/html/www.XXX.com/">
allow from all
Options -Indexes
AllowOverride All
</Directory>
CustomLog ${APACHELOGDIR}/XXX.log common
ErrorLog ${APACHELOGDIR}/XXX-error.log
</VirtualHost>
.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUESTFILENAME} !-f
RewriteCond %{REQUESTFILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Это не соответствует: 'DocumentRoot/var/www/html/XXX.com /' и '' –
Спасибо. Исправлено это, но постоянные ссылки по-прежнему не работают. – JustJon
Почему у вас есть '% {REQUESTFILENAME}' вместо '% {REQUEST_FILENAME}'? –