ASPX templates
Version 5.x > ASPX templates > Trailing Slash on default.aspx View modes: 
User avatar
Member
Member
seanbun - 6/25/2010 1:15:16 AM
   
Trailing Slash on default.aspx
Hi,

Under the Setting page, there are options we use/not use URLS with trailing slash (or leave the url as is). I have set my site to "Always use URLs with trailing slash". Then, I found a small issue. I found my default page always go to http://www.[example].com/default.aspx/. Even going to the root would redirect to above page.

Is there any way I can hide the default.aspx?

Cheers,
Matt




User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/25/2010 3:11:11 AM
   
RE:Trailing Slash on default.aspx
Hi,

You can add this key to your web.config file with value set to true:

<add key="CMSUseTrailingSlashOnlyForExtensionLess" value="true" />

This will ensure, that the trailing slash will be applied only if there is no extension in the URL. If there is some extension, trailing slash will not be added.

Best regards,
Juraj Ondrus

User avatar
Member
Member
seanbun - 6/27/2010 6:37:02 PM
   
RE:Trailing Slash on default.aspx
Hi Jurag,

Thanks for your quick reply.

I am using version 5.0. Does this version support the CMSUseTrailingSlashOnlyForExtensionLess key? I could not find this key in the Documentation - Appendix C Web.config parameters.

Cheers,
Matt

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/28/2010 8:29:25 AM
   
RE:Trailing Slash on default.aspx
Hi,

This should work, it is just not documented in the developer's guide. I noticed our technical writer about it.

Best regards,
Juraj Ondrus

User avatar
Member
Member
seanbun - 6/29/2010 12:36:54 AM
   
RE:Trailing Slash on default.aspx
I tried the CMSUseTrailingSlashOnlyForExtensionLess key on Version 5.0. Unfortunately, it did not work. It still redirects my xxxx.aspx to xxxx.aspx/

User avatar
Member
Member
seanbun - 6/29/2010 12:38:16 AM
   
RE:Trailing Slash on default.aspx
Again, my Kentico version is v5.0.3715.


Cheers,
Matt

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/29/2010 9:25:17 AM
   
RE:Trailing Slash on default.aspx
Hi,

My fault. Regrettably this key was added into 5.5 version so it won't work in 5.0 version. You will need to upgrade to achieve this functionality. I am sorry for the confusion.

Best regards,
Juraj Ondrus

User avatar
Member
Member
seanbun - 7/1/2010 7:56:14 PM
   
RE:Trailing Slash on default.aspx
Okay. I will try to upgrade to 5.5 or work around with URL Rewrite.

Cheers,
Matt