Let’s say I have an SSL secured domain at secure.domain.com.
I also have a web application (using silverstripe) at http://www.domain.com and another at app.domain.com (using CakePHP)
I would like specific areas of http://www.domain.com and app.domain.com to utilize SSL, and thus must somehow rewrite the paths using the subdomain with the installed SSL certificate.
So for example, secure.domain.com/ss/* should rewrite to http://www.domain.com/* and similarly, secure.domain.com/app/* should rewrite to app.domain.com/*.
The challenge, however, is that both http://www.domain.com (SilverStripe) and app.domain.com (CakePHP) have their own complex rewrite rules, and I can’t seem to build an htaccess script that successfully retains the functionality of the respective applications…
FYI Assume I have the directory structure /public_html and webroots assigned to the apps as follows:
http://www.domain.com -> /public_html/subdomains/www
app.domain.com -> /public_html/subdomains/app
secure.domain.com -> /public_html/subdomains/secure
Has anyone accomplished something similar to this before?
The most elegant way is to simply symlink the SSL subdirectory to the apps folder, so they’re basically the same directory.
That is, if your host gives you this option.