Welcome Guest. Please Login or Register  


You are here: Index > Webuzo > General Support > Topic : Force www. on primary domain



Normal Mode | Print  

Force www. on primary domain
erile
Group: Member
Post Group: Working Newbie
Posts: 64
Status:
Unless mistake (I'll re-test on monday), I think I found the right way to achieve the goal: force both SSL and www whatever the scheme, knowing Webuzo doesn't allow to separate www and non-www in two server blocks. It seems http://domain.com, http://www.domain.com and https://domain.com (the most problematic one) ) are all redirected to https://www.domain.com now. Apparently no infinite loop this way.

I added an extra conf for domain.com from Webuzo > Domain > Extra Configuration with this content:
Code

if ($scheme = http) {
    return 301 https://www.domain.com$request_uri;
}
if ($http_host = domain.com){
    return 303 https://www.domain.com$request_uri;
}

It may help another one someday...
Solved (it seems)!

-----------------------
OpenVZ VPS, CentOS 7, Webuzo Premium / Desktop and full-stack dev w/ C, C++, Python, Perl, javascript...
IP: --   


Threads
 erile   Force www. on primary domain (3 Replies, Read 26133 times)
    |--  erile   Unless mistake (I'll...   on August 18, 2019, 10:34 pm
    |--  Dhanya   Hi, In order...   on August 19, 2019, 1:01 pm
    |--  erile   I know this,...   on August 20, 2019, 11:56 am

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is July 6, 2025, 12:49 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.010