Answer the question
In order to leave comments, you need to log in
Transferring statics to a subdomain for a running project
It is necessary to translate the project statics (css/js/images) to the cdn.<site_domain>.com subdomain using nginx. From a logical point of view, everything seems simple to me:
1. I create a subdomain in the config
2. I change the address of statics on the site
The problem is that I can not take into account all the places with the output of statics, so I would like to play it safe.
Question: is it religiously correct from the point of view of SEO to make a 301 redirect in nginx for static? Those. I now have a standard location for statics, so I will put a redirect to cdn.<site_domain>.com there. And is it necessary to immediately kill the processing of statics on the main domain (won't this be considered a duplicate)?
Answer the question
In order to leave comments, you need to log in
And is it necessary to immediately kill the processing of statics on the main domain (won't this be considered a duplicate)?
You need something like a conditional redirect, if file exist? Did I understand you correctly? I don't understand what duplicates you are talking about. Duplicate pictures? Why does the option with nfs and mounting folders to the old location not suit you?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question