c# - Orchard block content route -


i have myself orchard project, uploaded few files used on site, of these images lets don't want display yet , don't want delete them because else may want use them.

however if view goes site example

www.mywebsite.com/contents/item/display/1 

and attempts find random content item will, maybe provide or not used longer. i'm trying ask inside of routes.cs in orchard project need implemented redirect users content home page?

i have answer works me.

i editted web.config in orchard.web project, added these lines inside of system.webserver

<system.webserver>  ... ...    <rewrite>     <rules>       <rule name="redirect users away content" stopprocessing="true">         <match url="^contents/(.*)" />         <action type="redirect" url="/" />       </rule>     </rules>   </rewrite>  </system.webserver> 

hope helps else out.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -