WHMCS htaccess to allow downloading
With WHMCS you can't download files if using HTTPS. E.g. The following line DOES NOT WORK:
https://www.mysite.com/client/dl.php?type=a&id=239&i=0
However, this works:
http://www.mysite.com/client/dl.php?type=a&id=239&i=0
So, my question is, how do I add a redirect rule to the following:
RewriteCond %{HTTP_HOST} !svn.namhost.com
RewriteCond %{HTTP_HOST} \.
RewriteCond %{HTTP_HOST} !^www [OR]
RewriteCond %{HTTP_HOST} !\.com$ [OR]
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://www.mysite.com/$0 [R=301,L]
So t开发者_JS百科hat if you access:
https://www.mysite.com/client/dl.php?type=a&id=239&i=0
It opens:
http://www.mysite.com/client/dl.php?type=a&id=239&i=0
???
RewriteCond %{REQUEST_URI} ^/client/dl.php
RewriteCond %{HTTPS} on
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Should work. Doesn't seem like the stuff you already have should interfere because it excludes stuff with www, but if it does, you can just add
RewriteCond %{REQUEST_URI} !^/client/dl.php
to your first block (before the RewriteRule
).
精彩评论