How to redirect to https, www (https://www.domain.xx) and if media css, js, png, svg redirect to (https://cdn.domain.xx)
The code below almost works.
RewriteCond %{HTTPS} !=on [NC,OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{REQUEST_URI} !^.+\.(jpe?g|ico|png|svg|css|js)$ [NC]
RewriteRule ^(.*)$ https://www.domain.xx%{REQUEST_URI} [R=301,L]
Aucun commentaire:
Enregistrer un commentaire