Hmm... I was trying to set up my server with SSL and look what I've found:

------------------
How can I use relative hyperlinks to switch between HTTP and HTTPS?    [L]

Usually you have to use fully-qualified hyperlinks because you have to
change the URL scheme. But with the help of some URL manipulations through
mod_rewrite you can achieve the same effect while you still can use relative
URLs: 


    RewriteEngine on
    RewriteRule   ^/(.*):SSL$   https://%{SERVER_NAME}/$1 [R,L]
    RewriteRule   ^/(.*):NOSSL$ http://%{SERVER_NAME}/$1  [R,L]
    
This rewrite ruleset lets you use hyperlinks of the form


    <a href="document.html:SSL">
---------------------

Not sure if it's helpful in your situation, but it might.

--Kit

> You can't do it in HTML, unless you specify the whole URL
> https://www.mydomain.com/manage.cgi.  You need some scripting language such
> as PHP, PERL, ASP, JavaScript, and maybe even SSI.  I suggest a redirection
> script or something. Example: redirect.php?path=manage.cgi
> 
> --Kit
> 
>> I can't for the life of me figure this one out. How do you change to ssl
>> using a relative path? Like, when it's time to move to a secure area, I
>> always seem to have to put in the full absolute path. This makes moving from
>> test to prod dangerous because I might miss one and shoot my customers over
>> to test by accident.
>> 
>> For example, let's say we're at http://www.mydomain.com/reg_system.cgi. I
>> want to link to https://www.mydomain.com/manage.cgi without specifying
>> www.mydomain.com.
>> 
>> Without the https, I just use /manage.cgi and the link works. But that
>> doesn't protect their pw etc. I want something like https:manage.cgi, but
>> that doesn't seem to work.
>> 
>> It's bugging me right now because I'm just putting in the .tv code and I
>> just found myself on my live website signing up for a domain when I though I
>> was in test!!!! Anybody have any ideas?
>> 
>> Thanks,
>> 
>> -Eric
>> 
>> -------------------------------------------------------
>> arctic bears - the internet - your way.
>> 50000 domain names were reserved today. was yours?
>> domains from US$25/year, name resolution, mail hosting.
>> http://www.arcticbears.com
>> 
>> 
> 

Reply via email to