29 lines
1.0 KiB
ApacheConf
29 lines
1.0 KiB
ApacheConf
RewriteEngine on
|
|
|
|
# Fix ERR_TOO_MANY_REDIRECTS on /Admin (2026-05-20).
|
|
# Two-layer guard:
|
|
# (1) Force HTTPS for any /Admin/* request - prevents the http<->https oscillation
|
|
# with PHP app that always emits https Location: headers.
|
|
# (2) Intercept /Admin (with or without trailing slash) BEFORE mod_dir issues a
|
|
# directory-slash 301 (which on this host degrades https->http, looping).
|
|
RewriteCond %{HTTPS} off
|
|
RewriteCond %{HTTP:X-Forwarded-Proto} !=https
|
|
RewriteRule ^Admin(/.*)?$ https://%{HTTP_HOST}/Admin$1 [R=301,L]
|
|
|
|
RewriteRule ^Admin/?$ Admin/index.php [L]
|
|
|
|
RewriteCond %{REQUEST_URI} !phpmyadmin
|
|
RewriteCond %{REQUEST_URI} !szablon
|
|
RewriteCond %{REQUEST_URI} !crossdomain.xml
|
|
RewriteCond %{REQUEST_URI} !Admin
|
|
RewriteCond %{REQUEST_URI} !error.html
|
|
RewriteCond %{REQUEST_URI} !rekbufor.html
|
|
RewriteRule !\.(js|ico|gif|jpg|png|ICO|GIF|JPG|PNG|css|svg|swf|flv|pdf|PDF|php|eot|woff|ttf|otf)$ index.php
|
|
|
|
ModPagespeed off
|
|
|
|
#
|
|
#AuthType Basic
|
|
#AuthName "Password Protected Area"
|
|
#AuthUserFile Static/.htpasswd
|
|
#Require valid-user |