[英]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.