簡體   English   中英

在wordpress中更改.htaccess文件

[英]changing the .htaccess file in wordpress

我試圖在localhost上使用WordPress permalink feature ,因此當我post name from Common Settings單擊post name from Common Settings時,我只是復制了generated by WordPress的代碼。 我將生成的代碼保存在本地主機中,其中wordpress index.php文件以.htaccess的名稱存儲,現在當我要訪問該頁面時, browser is showing the full address of the post網址欄browser is showing the full address of the post但該post can not be seen on the browser 。僅出現404 Not Found error is comming 有人可以告訴我這里錯了什么嗎?

您應該讓wordpress為您的本地主機服務器寫入此文件。

您不能簡單地從另一台服務器復制.htaccess並期望它可以正常工作,而必須對其進行修改以反映您的服務器配置。

您應該修改RewriteBase和最后一個RewriteRule ,例如對於http://localhost/wordpress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM