Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Custom ASP.Net Routes in Kooboo 3.0
sbrickey
#1 Posted : Saturday, February 04, 2012 7:53:50 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 12/16/2011(UTC)
Posts: 35
Location: Ohio, USA
I would like to create an ASP.Net Route for folders in the [files] section.

Currently, I have a folder called 'images' which is currently only accessible via /Cms_Data/Sites/[name]/Files/images... I would like to make it accessible with the URL of /images.

Thanks,
-Scott
jifeng
#2 Posted : Sunday, February 05, 2012 12:25:11 PM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
The path will conflict with the {KoobooRoot}/Images folder, If you really want to do it, please create a custom HttpHandler to process the request.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
sbrickey
#3 Posted : Sunday, February 05, 2012 8:49:11 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 12/16/2011(UTC)
Posts: 35
Location: Ohio, USA
I would be content using another name, or perhaps subfolder... I was just hoping to eliminate half of the URL...

Perhaps a page to specify such custom rules, which includes the required "system" rules (like 'images')?
jifeng
#4 Posted : Monday, February 06, 2012 1:37:19 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
Please go to see the routes.config, there are many custom routes in the files. You can create a new custom route before "{*PageUrl}" setting, then you can create a specify controller to handler your route request.

Alternative, you can create a page in the site to handler the image request via the page plugin. It is also a good solution for you.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.053 seconds.