Has anyone tried using this with an SSL site as of yet? I tried playing around with this on a couple of my sites that have pretty similar setups and it seems to work on one, but the one that I force to go through https:// seems to create a 301 redirect when I click the link from this snippet to a url like this:
https://www.mydomain.com443/home/ from
https://www.mydomain.com/home/ (it adds 443 after the .com)
This is my htaccess file:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^sandramillerfloral\.com [NC]
RewriteRule (.*) http://sandramillerfloral.com/$1 [R=301,L]
# HTTPS goes first, with ending [L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Reduce server overhead by enabling output compression if supported.
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5
And this is the headers when doing a net-trace while clicking the link:
Remote Address:107.170.25.225:443
Request URL:https://sandramillerfloral.com/home2/?cl_add=96
Request Method:GET
Status Code:302 Found
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:cookieList[items]=238%2C96; _jsuid=2253275308; cookieList[cl_check]=1; minishop2-category-grid-41=%7B%22start%22%3A0%2C%22limit%22%3A%22%22%2C%22action%22%3A%22mgr/product/getlist%22%2C%22parent%22%3A%2241%22%7D; minishop2-category-grid-291=%7B%22start%22%3A0%2C%22limit%22%3A%22%22%2C%22action%22%3A%22mgr/product/getlist%22%2C%22parent%22%3A%22291%22%7D; _sp_id.1249=fff95082430ff96f.1409625806.5.1412220935.1412018382; minishop2-category-grid-67=%7B%22start%22%3A0%2C%22limit%22%3A%22%22%2C%22action%22%3A%22mgr/product/getlist%22%2C%22parent%22%3A%2267%22%7D; cookieList[items]=238; _gat=1; _ga=GA1.2.517265031.1408034058; PHPSESSID=cjoovd9lkah7qagcdh2uq111g1
Host:sandramillerfloral.com
Referer:https://sandramillerfloral.com/home2/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36
Query String Parametersview sourceview URL encoded
cl_add:96
Response Headersview source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:26
Content-Type:text/html
Date:Thu, 02 Oct 2014 16:51:53 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=98
Location:https://sandramillerfloral.com443/home2/
Pragma:no-cache
Server:Apache
Set-Cookie:PHPSESSID=cjoovd9lkah7qagcdh2uq111g1; path=/; httponly
Set-Cookie:cookieList[items]=238%2C96; expires=Sat, 01-Nov-2014 16:51:53 GMT
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.10-1ubuntu3.9
Anyone had any experience with this in the past?