contao/test — Issue #2908: Different relative path for HTTPS (eg: for shared SSL certificates)
Author: importer
Created: 2011-11-29 10:32:11+00:00
State: open
Labels: Feature, framework

Hey,

In regard to the "Relative path to the Contao directory" setting stored in $GLOBALS['TL_CONFIG']['websitePath']

Would it reasonable to allow a second value to be set for use on HTTPS connections?
A common case where this is needed is on hosting services which provide a shared SSL certificate.
In such cases, the certificate is typically available through some arbitrary domain name and hence, when accessed, requires a path prefix specific to your account.

Setting this as the global prefix for your Contao installation works.
However, it leaves a messy looking result, and should probably be avoided when not necessary.
Having your hosting account username displayed in the URL is undesirable, and is even a potential security risk.
However, logging into and using the Contao backend over plain-text is also quite a security risk.

So, the cleanest solution would probably require the ability to define an alternate prefix for use on HTTPS connections.

Is this a possibility?

As far as i can tell, it looks like the easiest point to use such a value would be to add a condition
in initialise.php where TL_PATH is defined, testing $this->Environment->ssl

Thanks,
SamJ

--- _Originally created by samjetski on March 4th, 2011, at 04:55pm (ID 2909)_