There is a $_SERVER['SERVER_PORT'] and a $_SERVER['REMOTE_PORT'] as
well. Can detect if not 80, and then stitch on the attempted port:

http://php.net/manual/en/reserved.variables.server.php

SERVER_PORT has a caveat: The port on the server machine being used by
the web server for communication. For default setups, this will be
'80'; using SSL, for instance, will change this to whatever your
defined secure HTTP port is.

Jon

On Tue, Jan 10, 2012 at 1:55 AM, Bassel Safadi <[email protected]> wrote:
> we should be able to at any point, also support urls with different ports is
> simple.
> thinking of ways to enable developers to easliy extend aiki with such
> functionalities
>
> --
> Bassel Safadi | http://bassel.ws
> Skype: i.know.sy | Global: +1-323-545-3855
>
>
> On Mon, Jan 9, 2012 at 4:48 PM, Jon Phillips <[email protected]> wrote:
>>
>> Shouldn't we be accounting for more protocols? Are there more?
>>
>> [email protected]
>> http://fabricatorz.com
>> +1.415.830.3884
>> +86.187.1003.9974
>>
>> ---------- Forwarded message ----------
>> From: <[email protected]>
>> Date: Jan 9, 2012 8:59 PM
>> Subject: [Branch ~aikiframework-devel/aikiframework/trunk] Rev 1011: fixed
>> bug 911987 urls not working with https
>> To: "rejon" <[email protected]>
>>
>> ------------------------------------------------------------
>> revno: 1011
>> committer: bassel <[email protected]>
>> branch nick: aikiframework
>> timestamp: Mon 2012-01-09 14:55:27 +0200
>> message:
>>  fixed bug 911987 urls not working with https
>> modified:
>>  libs/aiki.php
>>
>>
>> --
>> lp:aikiframework
>> https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk
>>
>> You are subscribed to branch lp:aikiframework.
>> To unsubscribe from this branch go to
>> https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
>>
>> === modified file 'libs/aiki.php'
>> --- libs/aiki.php       2012-01-05 18:48:50 +0000
>> +++ libs/aiki.php       2012-01-09 12:55:27 +0000
>> @@ -415,6 +415,10 @@
>>                                $paths[] = $language;
>>                        }
>>
>> +                       if ($_SERVER["HTTPS"] == "on") {
>> +                               $url = str_replace("http://";, "https://";,
>> $url);
>> +                       }
>> +
>>                        $bufferReplace = array(
>>                                '[userid]'      =>
>> $aiki->membership->userid,
>>                                '[full_name]' =>
>> $aiki->membership->full_name,
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~aikiframework-devel
>> Post to     : [email protected]
>> Unsubscribe : https://launchpad.net/~aikiframework-devel
>> More help   : https://help.launchpad.net/ListHelp
>>
>



-- 
Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon
+1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing)

_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to