0
我的服務器最近被盜用。我將所有內容都移到了新服務器上,但由於某種原因,Wordpress網站的永久鏈接無法正常工作。我查看了所有內容,看起來都是正確的,但是我不明白爲什麼當這些設置全部從舊服務器上覆制過來的時候,這些鏈接無法工作。WordPress的永久鏈接不能在新的服務器上工作
服務器的.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 /'和'' –
2015-02-24 00:16:06
謝謝。修正了這個問題,但永久鏈接仍然不起作用。 – JustJon 2015-02-24 01:01:13
爲什麼你有'%{REQUESTFILENAME}'而不是'%{REQUEST_FILENAME}'? – 2015-02-24 04:29:30