簡體   English   中英

WordPress的刪除index.php

[英]wordpress removing index.php

我不確定是什么問題,我按照步驟刪除了index.php

  1. 已添加到.htaccess

     <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> 
  2. 選定的自定義結構

http://11.33.55.77/%pagename%/

例如,我訪問的任何頁面都是404

http://url.com/faq = 404

在此服務器上找不到請求的URL / faq。

確保常見問題頁面的永久鏈接實際上是/ faq,如果設置正確,請確保在您的apache中啟用了mod_rewrite

  1. 確保啟用了mod_rewrite。 sudo a2enmod重寫。 這對我不起作用

而是轉到apache2 / sites-available / default-000.conf

 <Directory />
    Options FollowSymLinks
    AllowOverride All
    </Directory>

    <Directory /var/www/html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>

復制並粘貼以下配置

暫無
暫無

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

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