These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Redirect mydomain.com to www.mydomain.com on the new forum.
Hi,
Aside from adding a .htaccess file to force redirection, is there any Virtualmin feature allowing for "mydomain.com" to auto redirect to "www.mydomain.com"?
-Peter
Howdy,
If you'd like to do a redirect like that, the best way would be through using a .htaccess file.
-Eric
Eric,
Was sort of hoping some feature was available through Virtualmin as doing the .htaccess method could become super time consuming as I need to redirect a few hundred domains in this manner.
The reason for this change is I'm going to be making use of "CloudFlare" as a "hosting provider" where traffic is filtered for "subdomains" and unfortunately not domains directly.
This is because CloudFlare makes use of my own DNS servers where "subdomains" are setup as CNAME's to their backend, and routed accordingly.
-Peter
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Hi,
I found a viable solution which seems to work, but will still require some time to implement.
Basically, I'm going to add a global Rewrite Rule to the Apache configuration file for each domain.
This rule will cause all "mydomain.com" variations to automatically do a "301" redirect to "www.mydomain.com" versions.
Based on the simple concept, all "subdomain.mydomain.com" will also redirect to "www.subdomain.mydomain.com" versions too.
I am also adding this ruleset to Virtualmin's template so that when new domains are created, the rule it automatically implemented.
-Peter
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist