Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • nickornotto 397 posts 900 karma points
    Jul 24, 2017 @ 14:14
    nickornotto
    0

    Hide/ custom routing of umbraco urls

    I am calling some actions from ajax in my umbraco. As they call some surface controller action I need to write them like this:

    eg.

    var url = "/umbraco/Surface/MyController/GetItems"
    

    Is there any way to route the url so I could get rid of 'umbraco/Surface' part of it?

    eg. /mysection/getItems
    

    Thanks

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jul 24, 2017 @ 16:38
    Alex Skrypnyk
    0

    Hi Manila

    You can route as you want your Controller, but not Surface controller.

    Why do you need Surface controller?

    Thanks

    Alex

  • nickornotto 397 posts 900 karma points
    Jul 24, 2017 @ 18:16
    nickornotto
    0

    I don't want to show it's umbraco website

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jul 24, 2017 @ 21:38
    Alex Skrypnyk
    0

    Are you using Umbraco Context?

    Try to use usual MVC controllers with custom routing.

  • nickornotto 397 posts 900 karma points
    Aug 01, 2017 @ 06:55
    nickornotto
    0

    How to do it?

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 01, 2017 @ 09:25
    David Brendel
    0

    Hi manila,

    you can use custom urls and do a url rewrite using IIS Rewrite module. That should be possible.

    Depending on what you want to do with your form you can stick with a SurfaceController.

    Regards David

Please Sign in or register to post replies

Write your reply to:

Draft