> > > So how does it determine if the page exists or not based on > extension? > Well it does not. The extension is based to determine the > mimetype and potentially the subtemplate to use. > > Fire up your favorite IDE and check the usages of > g/setExtension and g/setSelector of AggregationState.
Will do so.... > > This will hopefully clarify it a bit for you. Now I sort of > agree that we should have a mechanism to "disallow" > extensions, or only allow a fixed set of extensions depending > on the page, because it is indeed kinda wrong to be able to > get "http://fn0161.nemours.org/ I agree defined extensions should be supported on standard pages and its defined subtemplates (like .html, .print, .rss, etc, etc) But one should not be be able to put any extension they want > magnoliaPublic/www/page1.doesnotexist" ... otoh, what harm > does it do ? Harm? Let me put it into perspective.... We will have 150 authors whose job knowledge includes everything but the web design (they are not tech savvy) To them creating a link to page1.html or page1.htm or page1.blah is all the same. The only way they would know the difference is if the page does not "work" (404) Another reason is to prevent people from putting obscene word in an extension. Yes the content goes through QA process, but large companies such us ours has to protect itself from lawsuits and be compliant with a lot of policies (HIPAA). Amir > > Cheers > > g > > > > From my testing, the only time you get 404 is if you try to access > > page whose parent does not exist... > > > > Like: > > > > http://fn0161.nemours.org/magnoliaPublic/www/doesnotexist/ > > page1.html (404 - not found) > > > http://fn0161.nemours.org/magnoliaPublic/www/page1.doesnot > exist > > (found !!!) > > > > > > I just think the behavior should be consistent, do you agree... > > Now for implementation....Well I didn't claim it would be easy :) > > > > P.S. > > As for the way default extension works, why would you want to > > interpret /page as /page.html? > > To me /page is 404, while /page.html is a valid URI.... > > > > I thought the default server extension is the extension > that filter > > triggers on... > > > > > > > > Thanks > > > > Amir > > > > > >> -----Original Message----- > >> From: [email protected] [mailto:[EMAIL PROTECTED] > >> Sent: Wednesday, May 30, 2007 3:17 PM > >> To: [email protected] > >> Subject: Re: [magnolia-dev] extension on pages > >> > >>> I am not sure if this is a bug or not, but in Magnolia accessing a > >>> page that does NOT have a default extension still > >> works...This should > >>> not be so, and error 404 should be raised. > >>> Server Default Extension: html > >> > >> default extension does not say that its the only extension > >> used by magnolia, it simply means that if the incoming > >> request does not have any extension to it magnolia will use > >> the value defined by default extension for this particular request. > >> > >> Regards, > >> > >> Sameer Charles > >> Magnolia International Ltd. > >> > >> -------------------------------------------------------------- > >> ---------- > >> --------- > >> [EMAIL PROTECTED] http://www.magnolia.info > >> Magnolia® - Simple Enterprise Content Management > >> -------------------------------------------------------------- > >> ---------- > >> --------- > >> > >> > >> On May 30, 2007, at 7:25 PM, Amir Mistric wrote: > >> > >>> Hi > >>> > >>> I am not sure if this is a bug or not, but in Magnolia accessing a > >>> page that does NOT have a default extension still > >> works...This should > >>> not be so, and error 404 should be raised. > >>> > >>> For, example: > >>> > >>> Server Default Extension: html > >>> > >>> http://fn0161.nemours.org/magnoliaPublic/www/page1.html > >> (proper url) > >>> > >>> However, all of the following will also work and they should be > >>> raising 404... > >>> > >>> http://fn0161.nemours.org/magnoliaPublic/www/page1.htm > >>> http://fn0161.nemours.org/magnoliaPublic/www/page1.amir > >>> http://fn0161.nemours.org/magnoliaPublic/www/ > >>> page1.whateverIfeellikeputtinghere > >>> > >>> > >>> Thoughts? > >>> > >>> Amir > >>> > >>> ---------------------------------------------------------------- > >>> for list details see > >>> http://www.magnolia.info/en/developer.html > >>> ---------------------------------------------------------------- > >> > >> > >> > >> > >> > >> > >> > >> > >> ---------------------------------------------------------------- > >> for list details see > >> http://www.magnolia.info/en/developer.html > >> ---------------------------------------------------------------- > >> > > > > > > ---------------------------------------------------------------- > > for list details see > > http://www.magnolia.info/en/developer.html > > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > for list details see > http://www.magnolia.info/en/developer.html > ---------------------------------------------------------------- > ---------------------------------------------------------------- for list details see http://www.magnolia.info/en/developer.html ----------------------------------------------------------------
