SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    - Michael - Bytecon's Avatar
    Join Date
    Mar 2004
    Location
    Ireland
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Rewrite HTTP to HTTPS problem with CGI directory

    Hey,

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

    Code:
    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

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    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
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •