How to rewrite paths on single SSL secured subdomain to secure web apps on other subdomains using htaccess
Let's say I have an SSL secured domain at secure.domain.com.
I also have a web application (using silverstripe) at www.domain.com and another at app.domain.com (using CakePHP)
I would like specific areas of 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 www.domain.com/* and similarly, secure.domain.com/app/* should rewrite to app.domain.com/*.
The challenge, however, is that both 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: www.domain.com -> /p开发者_Python百科ublic_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.
/public_html/app
/public_html/subdomains/secure.domain.com -> /public_html/app
That is, if your host gives you this option.
精彩评论