Is there a way within the Umbraco framework to get any requests for Umbraco pages and be able to perform some logic from which I could then redirect?
I could use the BeginRequest within a HttpModule but then I would need to start filtering for css/javascript/etc requests which I don't want to do. I only want requests that are for pages in the Umbraco CMS.
I was asking generally as it's something I'd like to know how to do with Umbraco.
In this instance I'm making a single page website which uses HTML5 to manipulate the URL without a page load. This works fine but if I then refresh the page it obviously is looking for the actual URL within Umbraco where I want it to always load the home page. For example, I change the URL to /contact with javascript. Then I press reload. This then tries to load the contact page. I want to intercept this and always load the home page.
As I said though, I would like to know if there is some way to intercept Umbraco requests.
Redirecting Umbraco Page Request
Is there a way within the Umbraco framework to get any requests for Umbraco pages and be able to perform some logic from which I could then redirect?
I could use the BeginRequest within a HttpModule but then I would need to start filtering for css/javascript/etc requests which I don't want to do. I only want requests that are for pages in the Umbraco CMS.
Thanks,
Jon
Hi Jon
What kind of logic do you need to make before doing the redirect? What is the scenario?
/Jan
Hi Jan,
I was asking generally as it's something I'd like to know how to do with Umbraco.
In this instance I'm making a single page website which uses HTML5 to manipulate the URL without a page load. This works fine but if I then refresh the page it obviously is looking for the actual URL within Umbraco where I want it to always load the home page. For example, I change the URL to /contact with javascript. Then I press reload. This then tries to load the contact page. I want to intercept this and always load the home page.
As I said though, I would like to know if there is some way to intercept Umbraco requests.
Thanks,
Jon
Anyone got any ideas here? Or has anyone built single page sites in Umbraco like this?
Hi Jon,
Haven't tried this my self but I have bookmarked some articles about this.
I don't know if they can help you solve your specific problem, but they can probably point you in the right direction
http://24days.in/umbraco/2014/angular-powered-frontend/
http://www.nibble.be/?p=224
http://kpensar.com/blog/2014/02/17/umbraco-hearts-angular-a-series-on-building-an-spa-application/
Dave
is working on a reply...