I want a redirect from a subdomain to an external URL to a page of this URL. I need to show the subdomain in the URL. Not the external domainname with path.
I tried it in .htaccess in the subdomain of this rootdomain. But nothing so far is working.
I have the following code:
RewriteEngine On RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^elvis.ocien.be$ [OR]
RewriteCond %{HTTP_HOST} ^www.elvis.ocien.be$
RewriteRule ^(.*)$ https://servicebox.be/quarki/software/elvis-dam/$1 [QSA,L,R=301]
I tried it with [P] instead [QSA,L,R=301] on the last rule. But that returns in a failure. Does anyone knows how to do this. Also with keeping the SSL HTTPS working?
Hope someone knows how to do this, thanks already