Permalink
Browse files

fix ssl, do not redirect assets files in ssl request

  • Loading branch information...
1 parent 14b7b13 commit fef26c316578b6ca850e7be6f579690796240138 @wongyouth committed Jan 10, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 source/_posts/2013-01-05-make-your-site-ssl-enabled.markdown
@@ -58,6 +58,10 @@ startssl.com支持class1级别的ssl服务,如果你的网站没有多个子
SSLCertificateChainFile /usr/local/apache/conf/sub.class1.server.ca.pem
SSLCACertificateFile /usr/local/apache/conf/ca.pem
RewriteEngine On
+
+ # assets files should not be redirected.
+ RewriteRule \.(css|js|gif|jpe?g|png)(\?[0-9]*)?$ - [NC,L]
+
RewriteCond %{HTTP:X-Forwarded-Proto} !=http
RewriteCond %{REQUEST_URI} !^/login
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L]

0 comments on commit fef26c3

Please sign in to comment.