2016-07-29 33 views
0

我有一個WordPress網站。這在xampp上完美運行,但現在我已經遷移到lampp(Apache)。只有主頁正在工作。其他頁面未找到。這是我的htacces文件代碼。on localhost只有主頁在wordpress站點上工作

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /website/ 
RewriteRule ^index\.php$ - [L] 
RewriteRule ^unsubscribe/$ /website/wp-content/plugins/email- newsletter/unsubscribe/unsubscribe.php [QSA,L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /website/index.php [L] 
</IfModule> 

# END WordPress 
+0

你可以使用管理員區嗎? –

+0

是的,管理員是可以訪問的。 –

+0

請檢查wordpress是否有權寫入.htaccess –

回答

0

您能否再次保存固定鏈接?

第1步:轉到wp-admin->setting->permalinks

步驟2:後保存更改

enter image description here

+0

我已經嘗試過,但它並沒有幫助我。 –

+0

可以請您備份您的'.htaccess'文件,然後刪除保存永久鏈接後的所有代碼? – purvik7373

+0

也試過了,它保存了所有的httacees代碼,但仍然沒有找到頁面。如果我將我的固定鏈接更改爲純文本,頁面將起作用。 –

0

更新您再次永久鏈接你有什麼alreade 去轉到wp-admin-> setting-> permalinks 或者你可以嘗試使用波紋管功能n

function change_permalinks(){ global $ wp_rewrite; $ wp_rewrite-> set_permalink_structure('/%postname%/'); $ wp_rewrite-> flush_rules(); } add_action('init','change_permalinks');

相關問題