Answer the question
In order to leave comments, you need to log in
One product page for two cities or more?
There are two, almost identical pages.
For example https://example.com/dress/some-name/odessa and https://example.com/dress/some-name/kiev
The difference is only in the title and description, depending on the page either "buy in Odessa" is substituted or "buy in Kiev".
Actually the question is: is it possible to trade like this, maybe there is some kind of meta tag for such cases?
Answer the question
In order to leave comments, you need to log in
<?php
$domains = array(
'sitename1.ru'=>'в Рязани и Рязанской области', // выводится на первом домене
'sitename2.ru'=>'в Москве и Московской области', // выводится на втором домене
'default' => 'в вашем городе и области', // выводится там, где домен по какой-то причине не определен, чаще всего на локалке при разработке
);
$site = strtolower($_SERVER['HTTP_HOST']);
$site = str_replace('/^www\./', '', $site);
if (!array_key_exists($site, $domains)) {
$site = 'default';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question