0

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?

bardur
  • 25
  • 3
  • i see [here][1] it's maybe the same question :D goodluck [1]: http://stackoverflow.com/questions/10642426/htaccess-rewrite-subdomain-to-directory – Ftoi' May 20 '15 at 08:05

1 Answers1

0

You can use:

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !=dev.web.no
RewriteRule ^ https://website.no/%{REQUEST_URI} [L,R=301,NE]
anubhava
  • 761,203
  • 64
  • 569
  • 643