Force https:// cause problems in htaccess

I have a htaccess file that forces everything to load a specific https address.

We have two domains, lets say web.no and website.no.

web.no points to website.no, but i have a subdomain dev.web.no that i dont want to redirect to website.no

The rules is

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://website.no/%{REQUEST_URI} [L,R=301]

How do I make an exception for dev.web.no?


Source: apache

Leave a Reply