Исправить проблему в файле .htaccess
2 USDПроблема в файле .htaccess, см. скриншот

Делали по такому примеру: https://stackoverflow.com/questions/17453412/redirect-to-http-non-www-to-https-www-htaccess
RewriteEngine On #we replace domain.com/$1 with %{SERVER_NAME}%{REQUEST_URI}. RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*) https://www.%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
#here we dont use www as non www was already redirected to www. RewriteCond %{HTTPS} off RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
But if my URL is
https://example.com/pageit does not redirect to WWW. Any ideas? – Viswalinga Surya S Oct 12 '17 at 4:57http://example.com/pagesuccessfully redirects to www. – Viswalinga Surya S Oct 12 '17 at 4:58This works for angular project that has path like url such as www.example.com/page-one – Jun Jul 20 at 23:44
Sorry I don't have enough point to comment, but the rule of @prix will bring unneeded redirect.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301] You can try http://domain.com/ on GTMETRIX and you will get this message
"Avoid landing page redirects for the following chain of redirected URLs."
http://domain.com/ http://www.domain.com/ https://www.domain.com/
To prevent that, go to the first RewriteRule and add a "s" at the end of http. The new set of rule will look like this :
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301] Может что-то не учли?
-
1110 49 0 Судя по всему, у вас срабатывает первое правило, проверяющее физическое наличие файла. Могу посмотреть.
-
190 3 0 Здравствуйте, готов поправить.
Сотрудничаем через activecollab, skype, slack, лс, email etc.
Работа с PHP/Wordpress( наполнение контентом, копирайтинг, тестирование сайтов, создание/редактирование плагинов, виджетов, редактирование/создание различной сложности тем более 3 лет).
Перенос сайтов на различные хостинги (в частности на aws server), vesta panel.
Так же смотрите мое резюме для подробной информации.
Портфолио:
Freelancehunt
… Скиньте более подробное тз, доступы.
Уровень англ: intermediate.
Оплата: приват либо сейф
Спасибо за внимание.
-
101 Здравствуйте, готов выполнить ваш заказ, больше обо мне отзывов и контакты смотрите здесь https://u.to/1gK3Ew ; обращайтесь, спасибо за внимание.
-
553 107 0 Здравствуйте. Сделаю сейчас, обращайтесь.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
-
759 141 0 1 Обращайтесь готов вам помочь в правке htaccess
Skype: live:eugene.php7
-
Зверніть увагу на останій рядок, у Вас в "[L,R]" не вказано тип редіректу "[L,R=301]"
-
Current freelance projects in the category Web Programming
Landing page with a questionnaire
136 USD
Creation of a website with a questionnaire Task 1. Filling out the questionnaire 2. Receiving the result in XLS / PDF format Concise design Web Programming ∙ 48 minutes back ∙ 66 proposals |
Creation of the design for Radio PRIVOZ FM
163 USD
Creation of a unique logo for RADIO PRIVOZ FM In the style as in the attachment Additionally a placeholder for the website in the style SOON RADIO PRIVOZ FM WILL BE PLAYING HERE with a playback of an interesting track Logo Design, Web Programming ∙ 1 hour 2 minutes back ∙ 22 proposals |
Development of a 3D printing service with a paid catalog of models and a cost calculator
889 USD
Online service for ordering 3D printing: the user uploads a model, receives an automatic cost estimate (taking into account volume, material, printing time), and places an order. Paid catalog of 3D models: the ability to upload, purchase, and download models, integration with… Web Programming ∙ 2 hours 48 seconds back ∙ 43 proposals |
Fix issues with Facebook API in the OpenCart moduleIn OpenCart, there is a module for integrating Facebook and Instagram via API, OAuth, and Webhook. After opening the module page in the browser, the number of API requests to Facebook starts to increase, and the number of errors gr:get:InvalidID also rises. It is necessary to… PHP, Web Programming ∙ 3 hours 19 minutes back ∙ 26 proposals |
Updating the PrestaShop online store and integrating an AI assistant for wholesale
445 USD
An experienced PrestaShop developer is required to upgrade the online store LMAR.COM.UA Project information: LMAR.COM.UA is a wholesale online store for tools, household goods, plumbing, electronics, and home and garden accessories. The store has over 3000 products and more than… Web Programming, Web Design ∙ 5 hours 38 minutes back ∙ 23 proposals |