I'm trying to redirect
https://subdomain.example.com/mywebspace
to
https://www.subdomain.example.com/mywebspace
Unfortunately, I only have control over the contents in /mywebspace
. I tried to place the following .htaccess
file there (which is recognized by Apache, Basic Auth works) but the rewrite rule seems to have no effect:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Any hints?