简体   繁体   中英

Wordpress Permalinks 404 error with HTTPS host

My new permalinks continue displaying a 404 error on my site even after adding the AllowOverride and Rewrite modules parameters. Here is my default-ssl.conf file :

<IfModule mod_ssl.c>
<VirtualHost _default_:443>

ServerAdmin vincent.zzz@gmail.com
DocumentRoot /var/www/zzz
ServerName zzz.com.vn
ServerAlias www.zzz.com.vn

<Directory "/var/www/zzz">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
</Directory>

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

#end of custon stuff..... 

And here is the normal http part of my apache2.conf file :

<VirtualHost *:80>
ServerName zzz.com.vn
DocumentRoot /var/www/zzz
<Directory "/var/www/zzz">

    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    DirectoryIndex index.php

    #force SSL
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=permanent]

</Directory>

Would anyone have an idea ?

Are you sure that mod_rewrite is enabled? Is there a symbolic link to rewrite.load in /etc/apache2/mods-enabled ? You can enable the mod with:

sudo a2enmod rewrite

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