我剛剛將一個退出的WordPress網站與WooCommerce轉移到一個新的CentOS服務器。WordPress的 - 搬到CENTOS服務器現在鏈接不工作
我創建了一個虛擬主機,它看起來像下面這樣:
<VirtualHost *:80>
ServerName www.mysite.com
DocumentRoot "/var/www/website/public_html"
<Directory "/var/www/website/public_html">
Options Indexes FollowSymLinks MultiViews
# AllowOverride controls what directives may be placed in .htaccess files.
AllowOverride All
# Controls who can get stuff from this server file
Order allow,deny
Allow from all
</Directory>
<IfModule mpm_peruser_module>
ServerEnvironment apache apache
</IfModule>
ErrorLog /var/www/website.co.uk/error.log
CustomLog /var/www/website.co.uk/requests.log combined
</VirtualHost>
然後我安裝了所有的文件,並導入了數據庫。
的問題是,每當我訪問其他任何其他網頁比網頁,使用「後名」固定鏈接我得到一個404錯誤。例如,vising /shop
給出了一個404錯誤,但我可以用純當通過/?p=4
訪問店鋪頁面,這只是創建下列.htaccess
文件:
# BEGIN WordPress
# END WordPress
但是,每當我做一些事情,如崗位名稱以下get的進入:
# 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
mod_rewrite.c
因爲我發現它在我的phpinfo()
內容啓用。
任何想法,我要去的地方錯了嗎?
編輯:如果我做這樣的事情:
RewriteEngine On
asfl;asjflasfj
它顯示爲內部服務器錯誤。
你檢查日誌文件? – CBroe
@CBroe請參閱更新 – Phorce