Redirect user with module

Topics: Customizing Orchard, Writing modules
Sep 6, 2011 at 7:04 PM

I need to build a module that will intercept a page request, check if a user has a cookie and then redirect the user/show a different view and set a cookie. This is the standard "splash" page functionality seen on many sites. I'm looking for some pointers on how I should go about writing something like this in Orchard.  I'd like to release the module to the Orchard Gallery when it is complete.

Does Orchard have any specific hooks I should utilize , or should I just do this in a straight-forward MVC manner? Is there a specific Orchard best practice of hooking into the request pipeline early on?

Thanks

Coordinator
Sep 6, 2011 at 7:12 PM

You can use the Rewrite Rules module for that. It handles testing and creating cookies. Look at the link for documentation and examples.

And if you happen to have a blog, a blog post on how to make it would be great.