A
A
Alexander2020-01-17 21:07:12
Nginx
Alexander, 2020-01-17 21:07:12

How to set up a redirect from www to non-www in BitrixEnv?

Not directly in NGINX, not directly in apache, but in the BitrixEnv environment?
Is it possible to do this through the standard configurator? I don’t find the mood of domains there at all, which is strange.
I don’t remember what settings I specified during deployment, but now chromobrowsers from www.site.zn automatically go to site.zn, but FF opens www.site.zn before that, swearing that the certificate is bad (of course, bad - it’s for site .zn).
As a result, I cannot understand what the current configuration is and what the BitrixEnv configurator has already created there. Why do chrome browsers redirect? So there is somewhere a redirect from www to without www? Why doesn't the fox listen to him? Is he still missing? Then why does it redirect chromobrowsers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Dmitriev, 2020-01-17
@SignFinder

manually in the nginx configuration file located in /etc/nginx
Add something like this and command service nginx restart

server {
    server_name www.example.com;
    return 301 $scheme://example.com$request_uri;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question