Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2005
    Location
    Albany, NY
    Posts
    3,795

    forcing ssl for a subdomain??

    Hey all,

    Trying to force SSL when putting in http://helpdesk.ayksolutions.com so it goes to https://helpdesk.ayksolutions.com. So far, no luck. I've used mod_rewrite, but I think I'm doing something wrong.

    I also used Redirect permanent to redirect all http based requests to https://helpdesk.ayksolutions.com

    Any ideas on how to do this?
    AYKsolutions.com - High Bandwidth Specialists - 100TB/1Gbps/10Gbps Unmetered/CDN/DDOS Protected
    Over 20 Global Locations - Asia, Mexico, Brazil, India, Australia, US, CA, EU - Bare Metal and Virtual Cloud. All Managed.
    View our current Specials.
    We are Professional. Painless. Polite.

  2. #2
    Join Date
    Mar 2005
    Location
    Hattiesburg, MS
    Posts
    159
    RewriteEngine on
    RewriteOptions inherit
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]

    I use this with Apache 1.3 on a full domain www.domainname.com, not too sure if it will work with a subdomain but should...
    InsanelyMacintosh - Macintosh Software Repository Listings

  3. #3
    Join Date
    Sep 2005
    Location
    Albany, NY
    Posts
    3,795
    Thanks for the comments. I've tried that out, without the inherit option and while it does work, it doesn't work 100% correctly. So, I am looking for another way.
    AYKsolutions.com - High Bandwidth Specialists - 100TB/1Gbps/10Gbps Unmetered/CDN/DDOS Protected
    Over 20 Global Locations - Asia, Mexico, Brazil, India, Australia, US, CA, EU - Bare Metal and Virtual Cloud. All Managed.
    View our current Specials.
    We are Professional. Painless. Polite.

  4. #4
    Join Date
    Aug 2005
    Location
    UK
    Posts
    654
    I set-up I different vhost for the SSL site vs the non-SSL. In the non-SSL vhost block I just have Redirect https://site.com/

    This way there's no possibility of the site ever loading over a non-SSL connection, which IMO is better than matching the HTTPS with Rewrite in case it ever failed. Some one could update the .htaccess in the future and break it etc..

  5. #5
    Join Date
    May 2004
    Location
    Pflugerville, TX
    Posts
    11,222
    I'm shocked 301 didn't work for you. What happens when you try it? Does it simply fail? Can you set it up so I can see it?
    Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

  6. #6
    Join Date
    Sep 2005
    Location
    Albany, NY
    Posts
    3,795
    Well, the thing here is, 301 does work. However, when someone types in ayksolutions.com/helpdesk it takes them to https://helpdesk.ayksolutions.com/helpdesk which returns the 404. That's the problem with that. I suppose that's what I'm trying to find a work around for.

    That link does work now because I don't have the 301 setup at the moment.
    AYKsolutions.com - High Bandwidth Specialists - 100TB/1Gbps/10Gbps Unmetered/CDN/DDOS Protected
    Over 20 Global Locations - Asia, Mexico, Brazil, India, Australia, US, CA, EU - Bare Metal and Virtual Cloud. All Managed.
    View our current Specials.
    We are Professional. Painless. Polite.

  7. #7
    Join Date
    May 2006
    Posts
    150
    just create two virtual vhosts inside httpd.conf one for ssl and one for non-ssl

    and create a 404.shtml to point to the ssl version and a regular meta-refresh tag for the index page to redirect to the ssl'ed index


    thats what how i did it

  8. #8
    Join Date
    Sep 2005
    Location
    Albany, NY
    Posts
    3,795
    that's a good idea. I will give that a shot.
    AYKsolutions.com - High Bandwidth Specialists - 100TB/1Gbps/10Gbps Unmetered/CDN/DDOS Protected
    Over 20 Global Locations - Asia, Mexico, Brazil, India, Australia, US, CA, EU - Bare Metal and Virtual Cloud. All Managed.
    View our current Specials.
    We are Professional. Painless. Polite.

Posting Permissions

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