.htaccess – mapowanie adresów

# Wymuszanie https:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Zdejmuje www z adresu oraz inne subdomenty przed domeną główną

RewriteCond %{HTTP_HOST} ^(.*\.)example.waw.pl$ [NC]
RewriteRule ^(.*)$ https://example.waw.pl/$1 [R=301,L]

# Usunięcie index.php

RewriteCond %{THE_REQUEST} ^.*index.php.*
RewriteRule ^(.*)index.php(.*)$ $1$2 [NC,R=301,L]

# Mapowanie adresów

RewriteRule ^.*PolitykaPrywatnosci$   /?p=polityka [NC,L]
RewriteRule ^.*Start$                 /?p=start [NC,L]

Dodaj komentarz