Hi Ben,

On Wed, 2016-06-22 at 08:39 +1000, Ben Fortuna wrote:
> Hi,
> 
> Just wondering what is the standard practice for managing sling
> requests
> with no extension. My use case is that my index node is called
> 'index' so
> when I get a request for just the domain name root (ie.
> http://www.example.com/) it will redirect to my index but without an
> extension (ie. /content/blah/index). The content type for this
> request is
> text/plain, so the browser doesn't render the page.
> 
> Should this be handled in sling or is it common practice to use
> another
> mechanism to redirect / to /index.html?

In the default Sling launchpad we use the following properties to set
up the redirect from the root page:

{
    "jcr:mixinTypes": [ "sling:Redirect" ],
    "sling:resourceType": "sling:redirect",
    "sling:target": "/index.html"
}

Perhaps you can do the same.

Thanks,

Robert

Reply via email to