Combining rules...
2 posts
• Page 1 of 1
Combining rules...
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?
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?
Re: Combining rules...
Is anyone alive in here? Specifically, is anyone still supporting this product?
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests