Redirect Apache (mod_rewrite) from subdomain to https directory (vhost)
Hopefully I can find an answer here...
On one of my servers (Centos 5.5), I have been hosting a particularly complex CRM application for one of my clients. Recently they have asked about configuring SSL connections to the CRM. Problem is, SSL is already configured for their main domain but not the sub-domain where the CRM application is accessed.
Rather than purchasing another SSL certificate for their sub-domain (and probably another IP address), would it be possible to setup a redirection from the subdomain to a sub-directory in the SSL directory using mod_rewrite. I have searched online and through the other posts on LinuxQuestions but nothing I have tried works.
All requests made to http://sub.domain.com would be rewritten/redirected to https://domain.com/sub
Although this looks fairly simple, I have configured (Plesk) multiple virtual hosts that may cause problems.
Thanks in advance for any assistance.
You can use Recirect inside the vhost definition of sub.domain.com
Thanks, I wonder why I was thinking I needed something more complex?
This is perfect
|All times are GMT -5. The time now is 11:53 PM.|