On our site, we have a seperate login page called "login.ashx", located in the root of the site. It is not a part of umbraco, and login is simply a link to that file.
So my question is: Can i make a node in umbraco, that simply redirects to that file? Or better yet, "is" that file if you understand. The reason why is i want the "public access" restrictions to redirect to that file if a user is not logged in.
If there exists a better method, then i am all ears.
(I also tried to enforce a site wide login restriction on the IIS server manager, and redirect to that file, but i get a http error 401. Dont know if its wrong settings or what, but i think the above is easier).
I cant really see how thats supposed to work? The page you linked to describes the ordinary functionality of umbracoRedirect, which is only to umbraco nodes.
Add an umbracoRedirect property of type Textstring to that doctype
Create a page named "Access" anywhere in your site (but NOT as the Home node), using the Redirect document type and fill in its redirect property with the URL to your login.ashx page
Set the new page as the "Login page" for public access
Load the "Access" page in the browser and see that you end up on your login.ashx page...
Super late reply, so hope this isnt dead... The thing is that, my master document type contains the "umbracoRedirect" property, as a content picker type. And i cant create the "Redirect" document type as a second master (to create the different property because its inherited from the master), because then it isnt possible to allow it to be created under the home node. If this makes sense.
Is that because you're not allowed to change which types of content can be created under the Home node? Otherwise you should be able to allow the Redirect type as a child of Home (on the Structure tab of the Home document type).
You can then disallow it again after having created the one you need...
Using external html file as a node
I will try and make this short:
On our site, we have a seperate login page called "login.ashx", located in the root of the site. It is not a part of umbraco, and login is simply a link to that file.
So my question is: Can i make a node in umbraco, that simply redirects to that file? Or better yet, "is" that file if you understand. The reason why is i want the "public access" restrictions to redirect to that file if a user is not logged in.
If there exists a better method, then i am all ears.
(I also tried to enforce a site wide login restriction on the IIS server manager, and redirect to that file, but i get a http error 401. Dont know if its wrong settings or what, but i think the above is easier).
Hi Frederik,
You should be able to use the umbracoRedirect "special" property for that...
/Chriztian
I cant really see how thats supposed to work? The page you linked to describes the ordinary functionality of umbracoRedirect, which is only to umbraco nodes.
Hi Frederik,
I can see why you think that - but try this:
/Chriztian
Super late reply, so hope this isnt dead... The thing is that, my master document type contains the "umbracoRedirect" property, as a content picker type. And i cant create the "Redirect" document type as a second master (to create the different property because its inherited from the master), because then it isnt possible to allow it to be created under the home node. If this makes sense.
Okay?
Is that because you're not allowed to change which types of content can be created under the Home node? Otherwise you should be able to allow the Redirect type as a child of Home (on the Structure tab of the Home document type).
You can then disallow it again after having created the one you need...
/Chriztian
is working on a reply...