I have a WP blog at https://example.com/blog. I’m able to access the wp-admin pages but the front-end pages are messed up (https://example.com/blog/page/2/). I have /blog
set as an alias in my Apache VirtualHosts configuration file. It was working fine before I switched on HTTPS through Cloudflare.
<VirtualHost *:80> SSLEngine On SSLCertificateFile /etc/apache2/keys/example.pem SSLCertificateKeyFile /etc/apache2/keys/example.key ServerName example.com ServerAlias example.com DocumentRoot /var/www/html/example/master <Directory "/var/www/html/example/master"> MaxMindDBEnable On MaxMindDBFile DB /usr/local/share/GeoIP/GeoLite2-Country.mmdb MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code SetEnvIf MM_COUNTRY_CODE US AllowCountry Require env AllowCountry </Directory> Alias /blog /var/www/html/example/blog <Directory /var/www/html/example/blog> Options All AllowOverride All Require all granted MaxMindDBEnable On MaxMindDBFile DB /usr/local/share/GeoIP/GeoLite2-Country.mmdb MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code SetEnvIf MM_COUNTRY_CODE US AllowCountry Require env AllowCountry </Directory> ErrorLog $ {APACHE_LOG_DIR}/error.log CustomLog $ {APACHE_LOG_DIR}/access.log combined </VirtualHost>
.htaccess
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>