简体   繁体   中英

wordpress removing index.php

I'm not sure what the problem is I followed the steps to remove index.php

  1. Added to .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. Selected Custom Structure

http://11.33.55.77/%pagename%/

Any page I visit is a 404 for example

http://url.com/faq = 404

The requested URL /faq was not found on this server.

确保常见问题页面的永久链接实际上是/ faq,如果设置正确,请确保在您的apache中启用了mod_rewrite

  1. Make sure mod_rewrite is enabled. sudo a2enmod rewrite. This did not work for me

instead go to 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>

copy and paste the following configuration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM