Re: Response content type when url has no extension

2016-06-22 Thread Robert Munteanu
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.e

Re: Response content type when url has no extension

2016-06-22 Thread Bertrand Delacretaz
Hi, On Wed, Jun 22, 2016 at 12:39 AM, Ben Fortuna wrote: > ...Should this be handled in sling or is it common practice to use another > mechanism to redirect / to /index.html? ... I suspect people often use front-end rewriters like mod_rewrite to add extensions to URLs which have none. Having a

RE: Response content type when url has no extension

2016-06-22 Thread Jason Bailey
I believe that exists, or I'm misunderstanding the intent. Under org.apache.sling.servlets.resolver for the property servletresolver.defaultExtensions -Original Message- From: Bertrand Delacretaz [mailto:bdelacre...@apache.org] Sent: Wednesday, June 22, 2016 8:16 AM To: users Subject:

Re: Response content type when url has no extension

2016-06-22 Thread Oliver Lietz
On Wednesday 22 June 2016 14:15:42 Bertrand Delacretaz wrote: > Hi, > > On Wed, Jun 22, 2016 at 12:39 AM, Ben Fortuna wrote: > > ...Should this be handled in sling or is it common practice to use another > > mechanism to redirect / to /index.html? ... > > I suspect people often use front-end rew

Re: Response content type when url has no extension

2016-06-22 Thread Ben Fortuna
Hi all, I ended up using Oliver's suggestion of the urlrewritefilter, which I configured to redirect from the root path (i.e. /^/$/) to /index.html. Note that this requires the Servicemix bundle version of the org.tuckey.urlrewritefilter as the standard JAR doesn't included OSGi metadata. I did a

Re: Response content type when url has no extension

2016-06-22 Thread Bertrand Delacretaz
Hi, On Wed, Jun 22, 2016 at 4:19 PM, Jason Bailey wrote: > ...Under > org.apache.sling.servlets.resolver > for the property servletresolver.defaultExtensions ... This is not for the use case discussed here, as explained in that parameter's OSGi config description: servletresolver.defaultExtensi