Home RewriteRule to use shared host https ssl but keep original url
Reply: 0

RewriteRule to use shared host https ssl but keep original url

Petrus Vermaak
1#
Petrus Vermaak Published in 2017-12-05 06:09:55Z

I have a shared host that has installed free ssl certificates.
My Domain: http://mysite.co.za/
My Domain using provided SSL: https://web555.secure-secure.co.uk/mysite.co.za/

I have tried the following code and it works:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^mysite.co.za    
RewriteRule ^(.*) https://web555.secure-secure.co.uk/mysite.co.za/$1 [P] 

but I get: https://web555.secure-secure.co.uk/mysite.co.za/

I want to hide/mask their URL so that the final result is:

https://mysite.co.za 

Can anyone please help with it?

The following worked to redirect
RewriteCond %{HTTP_HOST} ^mysite\.co\.za$
RewriteRule ^$ https://web555.secure-secure.co.uk/mysite.co.za/? [L,R=301]

Do not know yet how to hide the web191.secure-secure.co.uk/ part of the https://web555.secure-secure.co.uk/mysite.co.za/ redirected url

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO