Home Apache & HTTPS : Htaccess 301 Redirection on multi domain website
Reply: 0

Apache & HTTPS : Htaccess 301 Redirection on multi domain website

user574
1#
user574 Published in May 25, 2018, 11:11 am

I use, on my website two domains, files are on a same folder

root/index1.php  

is main page of http://domain1.xyz

And

root/index2.php

is main page of http://domain2.xyz

I need to force Apache to redirect all http:// on https:// on both domain

I know I can use on .htaccess :

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://domain1.xyz/$1 [R=301,L]

For a unique domain but I can't find a solution for two

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO