Home htaccess merge 301 www and https
Reply: 0

htaccess merge 301 www and https

user439
1#
user439 Published in June 21, 2018, 10:17 am

The code below redirects none-www to www and subsequently forwards to https://

how can I merge these in one so that I won't have a double redirect.

# Redirect non www to www
RewriteCond %{HTTP_HOST} ^mysite.nl$ [NC]
RewriteRule (.*) http://www.mysite.nl/$1 [R=301,L] 

# Redirect non https to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.327933 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO