Answer the question
In order to leave comments, you need to log in
How to connect a second domain to the site?
Good!
How to attach a second domain to a site on openCart?
At the domain, registered DNS of a hosting. On hosting in ISPmanager, I registered a new domain as a pseudonym.
Works! But! Main page only. If I follow the links on the site, the domain changes back to the old one.
How to be?
Answer the question
In order to leave comments, you need to log in
And the fact that this will lead to possible changes in the issuance of search engines, since they will perceive this as duplication of content, does not bother you? If not, then you need to look at the web server settings, in particular, what is configured in VirtualHosts and .htaccess. See ReWrite_cond. Alias is the alias to redirect to the main one.
Of course, the links lead to the main url, if you want it to work both on that domain and on that one, then in the cms settings -> multisite ( www.opencart.com/index.php?route=feature/feature&p...
You can make a substitution , when entering domen-1, switching to domen-2, it's easier.In the main directory on the hosting there is .htaccess, add the following there:
# HTTP Rule
RewriteCond %{HTTP_HOST} ^www.domen-1\.ru
RewriteRule ^(.*)$ http://domen-2/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.domen-2\.ru
RewriteRule ^(.*)$ http://domen-2/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^domen-1\.ru
RewriteRule ^(.*)$ http://domen-2.ru/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question