Created
April 22, 2014 10:01
-
-
Save fracasula/11172699 to your computer and use it in GitHub Desktop.
Force Wordpress to HTTP on non-admin URLs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:443> | |
SSLEngine On | |
SSLCertificateFile /etc/apache2/ssl/www.example.com.crt | |
ServerName example.com | |
ServerAlias www.example.com | |
<Directory "/var/www/example/"> | |
AllowOverride All | |
Order allow,deny | |
Allow from All | |
</Directory> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/wp-(admin|login)(.*) [NC] | |
RewriteRule ^/(.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> | |
LogLevel debug | |
ErrorLog ${APACHE_LOG_DIR}/error_example_ssl.log | |
CustomLog ${APACHE_LOG_DIR}/access_example_ssl.log combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment