Tpl www redirect, where is the right place to edit

i have following situation
i would like to redirect from to
the https redirect works out of the box do not want to change it
but due to the reason that i have a magento multistore
i have 4 domains pointing to same main domain, they are aliases
in summary i have 1 domain and 7 aliases 4 of them are without www.
for that i want to modify some tpl nginx in order to redirect it to the right domain

my explanation was not the best… but it seems the question is obsolete.
because with redirect checker, everything shows fine…
301 and finally 200 which is everything green and redirect works as it should thank you anyway
please close

In edit web → Domain redirection:

HI, i already found this, but this does not answer my question

imagine you have i domain
then you switch can redirect to … which is fine for one domain
but imagine you have two or in my case 4 domains for one installation domain alias

then putting on that switch will always set fix

what im looking for is:
a funciton that adds www, if not exists with variable domain

and that functionality must be made by hand

with something like
www.$domain$urlrequest etc.

did you understand now better?

Then you will have to create a custom nginx template and choose it in the domain config

Thank you … i have already with mapping there…

something like this default magento nginx configuration… i edited the header
this mapping already works, but im not sure if someone who comes with gets the www from the store system or does it get the value aready via this mapping…
do you understand what i mean? i do not find better explanation at the moment.

# Default Web Domain Template #

map $http_host $magew { base; base; dm2; dm2;

server {
listen …

I am not certain because I am no ngnix expert but I think that if you set every domain you want to redirect as the main domain or an alias, nginx will catch the request and then your template will do the redirection.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.