A ASghostKI Verified User Joined Oct 30, 2020 Messages 30 Feb 2, 2021 #1 Hello, I have a domain name where the https redirect is enabled: There is some subdomain of the domain, and one of them only one I need to disable this option for it, how can do it? Any help will be appreciated folks.
Hello, I have a domain name where the https redirect is enabled: There is some subdomain of the domain, and one of them only one I need to disable this option for it, how can do it? Any help will be appreciated folks.
Richard G Verified User Joined Jul 6, 2008 Messages 13,357 Location Maastricht Feb 3, 2021 #2 Just disable it for the full domain. Then use a .htaccess in the public_html of that domain for the redirect with an exclusion for the subdomain.
Just disable it for the full domain. Then use a .htaccess in the public_html of that domain for the redirect with an exclusion for the subdomain.
A ASghostKI Verified User Joined Oct 30, 2020 Messages 30 Feb 3, 2021 #3 Thanks, That's what I thought I can do, but I was hopping for a cleaner way for this.
A ASghostKI Verified User Joined Oct 30, 2020 Messages 30 Feb 3, 2021 #4 Actually I figured out "the cleaner" way to do this I went to my /usr/local/directadmin/data/templates/custom/virtual_host2_sub.conf and I added a condition to the |FORCE_SSL_REDIRECT| So instead of this it looks like this: Code: <VirtualHost |IP|:|PORT_80| |MULTI_IP|> ... |FORCE_SSL_REDIRECT| ... It looks like this now: Code: <VirtualHost |IP|:|PORT_80| |MULTI_IP|> ... |*if SUB!="mysubdomain"| |FORCE_SSL_REDIRECT| |*endif| ... So when my httpd config gets generated, it adds the HTTPS rewrite rule only for other domains/subdomains.
Actually I figured out "the cleaner" way to do this I went to my /usr/local/directadmin/data/templates/custom/virtual_host2_sub.conf and I added a condition to the |FORCE_SSL_REDIRECT| So instead of this it looks like this: Code: <VirtualHost |IP|:|PORT_80| |MULTI_IP|> ... |FORCE_SSL_REDIRECT| ... It looks like this now: Code: <VirtualHost |IP|:|PORT_80| |MULTI_IP|> ... |*if SUB!="mysubdomain"| |FORCE_SSL_REDIRECT| |*endif| ... So when my httpd config gets generated, it adds the HTTPS rewrite rule only for other domains/subdomains.