Root Access Daily
Root Access Daily
@RootAccessDaily

"Force HTTPS with a PHP/.htaccess redirect"

"Force HTTPS with a PHP/.htaccess redirect"
If you're doing the http→https redirect in PHP or app middleware, every plain-http hit boots a full FPM worker just to send a 301. Bots hammer http://; you're burning workers on redirects.
Do it in nginx before PHP ever wakes:
server { listen 80; return 301 https://$host$request_uri; }
Now the redirect costs nothing — nginx answers in microseconds, FPM never spins up. Move it down the stack. Try it tonight.
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.