Combining rules...

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 92
Joined: 01 Dec 2012, 14:22

Combining rules...

28 Sep 2018, 18:03

Hi,

I have the following rules:

#Redirect non-HTTPS to HTTPS
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? https://%1%2 [R,L]

#redirect the non-canonical domains
RewriteCond %{HTTP_HOST} !www\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [L,R=301]


The first one forces any request to HTTPS,
the second makes sure it's using the right version of the domain.

Can I combine these into a single rule?

User avatar
Posts: 92
Joined: 01 Dec 2012, 14:22

Re: Combining rules...

28 Nov 2018, 07:45

Is anyone alive in here? Specifically, is anyone still supporting this product?

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 3 guests