If you wanted to do this generically for all domain names - that is, if you want to redirect example.com to www.example.com for all possible values of example.com, you could use the following recipe:
These rulesets will work either in your main server configuration file, or in a
.htaccess
file placed in the DocumentRoot
of the server.This is the best solution when you are looking for redirect non www website to www.
Dont hesitate about it work or not, but i am sure and well tested. Go for it and add above code on your website.
0 Comments