Hello,
I was following a post from a user asking about the best way to redirect all traffic on his server from port 80 to port 443.
Someone linked the original OP to
https://httpd.apache.org/docs/2.4/rewrite/avoid.html#redirectI decided to post my own question instead of hijacking his question. For my website, I've been using RewriteCond and RewriteRules, but I'm questioning whether is now the best approach or not.
I have some subdomains that get redirected to different ports that run services that aren't port 443. For example, when I go to
subdomain1.mydomain.com, it redirects me to
mydomain.com:
2083.In this case, could I use a redirect? Something like:
<VirtualHost *:80>
</VirtualHost>
<VirtualHost *:80>
...
</VirtualHost>
That seems a lot nicer than using all those dang rewrite rules.
Thanks!