Skip to content

Instantly share code, notes, and snippets.

@aktaumag
Created May 2, 2023 23:51
Show Gist options
  • Save aktaumag/ed8e224e6e2f76c97744c308fa8431db to your computer and use it in GitHub Desktop.
Save aktaumag/ed8e224e6e2f76c97744c308fa8431db to your computer and use it in GitHub Desktop.
Заметки для настроек сервера, .htaccess, php, js
Заметки для настроек сервера, .htaccess, php, js
@aktaumag
Copy link
Author

Для удаления index.php

для главной и прочих страниц

    RewriteCond %{THE_REQUEST} ^.*/index.php [NC]
    RewriteCond %{REQUEST_URI} !^/bitrix/admin/ [NC]
    RewriteRule ^(.*)index.php$ https://wseo.pw/$1 [R=301,L]

@aktaumag
Copy link
Author

HSTS заголовок настраивается в .htaccess

Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS

@aktaumag
Copy link
Author

Полезные ссылки:

Тестировщик
https://htaccess.madewithlove.com/

Примеры основных ситуаций
https://web-optimizator.com/301-redirekt-htaccess/

Проверка цепочек переадресаций:
https://www.websiteplanet.com/ru/webtools/redirected/

Проверка кода ответа и заголовков:
https://bertal.ru/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment