Rewrite HTTP to HTTPS problem with CGI directory

Hey,

I’m using the following code to redirect http to https


RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*) https://www.getsaas.com/$1

this works perfectly for
http://www.domain.com/link

but when I try
http://www.domain.com/cgi-bin/script.cgi

It doesn’t redirect to HTTPS?

Any ideas?

Any help greatly appreciated, thanks!

Michael

Michael,

Apparently, the way your server is set-up, cgi-bin bypasses your DocumentRoot and, thus, your redirection to the cgi-bin. Without help from your host, it looks like you’ll have to have script.cgi examine the protocol (http or https) and redirect as necessary.

Regards,

DK