D
D
Dmitry Levanov2015-12-14 17:00:18
htaccess
Dmitry Levanov, 2015-12-14 17:00:18

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>


When you try to search, it redirects to https://search.domain.com

How to remove the redirect to the https subdomain, and make a direct search.domain.com

PS The Aviasales technical support solution with VSD servers and a duplicate SSL does not quite suit me. Maybe there are some solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Gorlov, 2015-12-14
@dimalevanov

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.

D
Dmitry Levanov, 2015-12-15
@dimalevanov

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 question

Ask a Question

731 491 924 answers to any question