Answer the question
In order to leave comments, you need to log in
Redirect from https main domain to http subdomain?
I have a main site on https://, which has a ticket search form for Aviasales. The code:
<script charset="utf-8" type="text/javascript">
window.TP_FORM_SETTINGS = window.TP_FORM_SETTINGS || {};
window.TP_FORM_SETTINGS["f7753273a0d460d895fd679360c3fc6f"] = {
"handle": "f7753273a0d460d895fd679360c3fc6f",
"widget_name": "ЭКОИЗБА Трэвел Авиа",
"border_radius": "0",
"additional_marker": null,
"width": null,
"show_logo": false,
"show_hotels": false,
"form_type": "avia",
"locale": "ru",
"currency": "rub",
"sizes": "default",
"search_target": "_blank",
"active_tab": "avia",
"search_host": "search.ecoizbatravel.ru/flights",
"hotels_host": "engine.aviasales.ru/hotel_clicks",
"hotel": "",
"hotel_alt": "Сравнение цен на отели, отзывы гостей и фотографии - Hotellook.ru",
"avia_alt": "Aviasales - быстрый поиск авиабилетов онлайн, доступные цены, билеты бюджетных авиакомпаний",
"retargeting": true,
"trip_class": "economy",
"depart_date": null,
"return_date": null,
"check_in_date": null,
"check_out_date": null,
"id": 59960,
"marker": 86943,
"origin": {
"name": ""
},
"destination": {
"name": ""
},
"color_scheme": {
"name": "custom",
"icons": "icons_black",
"background": "#f2f2f2",
"color": "#080808",
"border_color": "#f2f2f2",
"button": "#008800",
"button_text_color": "#ffffff",
"input_border": "#ffffff"
},
"hotels_type": "hotellook_host",
"best_offer": {
"locale": "ru",
"currency": "rub",
"marker": 86943,
"search_host": "search.ecoizbatravel.ru/flights",
"offers_switch": false,
"api_url": "//www.travelpayouts.com/minimal_prices/offers.json",
"routes": []
},
"hotel_logo_host": "hotellook.ru",
"search_logo_host": "www.aviasales.ru",
"hotel_marker_format": "marker=",
"hotelscombined_marker": null,
"responsive": true,
"height": 395
};
</script>
<script charset="utf-8" src="//www.travelpayouts.com/widgets/f7753273a0d460d895fd679360c3fc6f.js?v=638" async></script>
Answer the question
In order to leave comments, you need to log in
You can try changing the setting `"search_host": "search.ecoizbatravel.ru/flights"` to `"search_host": "ecoizbatravel.ru/flights"`, which supports https and from this URL on your side already redirect to the whitelabel by http. We will not be able to provide you with a quick solution now, since we deliberately force a relative protocol everywhere in the form.
The problem is solved, I thank Pavel Gorlov for the idea.
I post the algorithm, it will suddenly come in handy:
1. Create a WhiteLabel on a subdomain (in my case, search.ecoizbatravel.ru)
2. In the .htaccess file on the hosting, add the following line:
3. In the search form, replace "search_host"
with "search_host": "search.ecoizbatravel.ru/flights"
,
with "search_host": "ecoizbatravel.ru/search/flights"
Everything works just perfect!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question