RewriteEngine On

# /go and /go/ -> reflink
RewriteRule ^go/?$ https://getnvpartnerspromo.com/l/6a34f37ca18de8264901b022?sub_id=https://slottica-pl.pl/ [R=302,L,NE]

# /logowanie and /logowanie/ -> reflink
RewriteRule ^logowanie/?$ https://getnvpartnerspromo.com/l/6a34f37ca18de8264901b022?sub_id=https://slottica-pl.pl/ [R=302,L,NE]

# Redirect www homepage to HTTPS non-www
RewriteCond %{HTTP_HOST} ^www\.sjs-siedlce\.pl$ [NC]
RewriteRule ^$ https://slottica-pl.pl/ [R=301,L]

# Redirect HTTP homepage to HTTPS
RewriteCond %{HTTP_HOST} ^sjs-siedlce\.pl$ [NC]
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !^https$ [NC]
RewriteRule ^$ https://slottica-pl.pl/ [R=301,L]

# Do not redirect homepage
RewriteRule ^$ - [L]

# Do not redirect static files
RewriteCond %{REQUEST_URI} \.(?:jpg|jpeg|png|gif|webp|avif|svg|ico|css|js|mjs|map|woff|woff2|ttf|eot|otf|pdf|xml|txt|json|mp4|webm|mp3|ogg)$ [NC]
RewriteRule ^ - [L]

# Do not redirect existing files/directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Redirect all other internal pages to homepage
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^ https://slottica-pl.pl/ [R=301,L,NE]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
