We have the following website structure:
content
mysite
en
home
testlevel1page
testlevel2page
Under the /etc/map/http
directory, add a node "www.mysite.com" and give this a sling:internalRedirect
property of /content/mysite/en/home
.
As per the Sling documentation, this will "prefix the URI paths of the requests sent to this domain with the string" — i.e. in this case, appending "/content/my/en/home" after the domain name for any incoming requests to "www.mysite.com".
Optionally, if you place this under /etc/map.publish/http
, this will only be applied to instances with a Sling run mode set to publish.
(As the rule is under a node called 'http', this won't be applied to secure requests. If you need to cater for 'https' too, you could copy the http node, or preferrably create a regex — this isn't as common a use case, but more info on the docs linked above.)