Are you talking about removing extension from url, like login.aspx to login only? If so you can change it by setting umbracoUseDirectoryUrls value true in web.config file.
If you want to go extensionless then what Pnima writes above should solve your issue.
But I'm a bit curious about why you're checking it this way? Why don't you take advantage of Umbraco being based on the standard ASP.NET mebership provider? When you create a membertype and assign it to a membergroup you can then set access restrictions on the nodes in Umbraco by using "public access". Then you can select that it should be based on groups and then select your login page and your error page.
How have you made your login setup? Normally it should be possible to enter that message in a rich text editor on the login page for instance and then place the login box in the rte by inserting a macro for instance.
You should be able to do some url rewriting to achieve the above.
Try going to the config folder and open the urlrewriting.config file - it contains an example on how to do the above. Must admit that I'm not a wizard in url rewriting myself though - but try having a look at it and see if it makes sense :)
query string access
Hi,
I'm using a query string when redirecting a user to the login page so I can let them know why they were redirected there.
For example: if they get the password wrong I will add /login?msg=wrong and set a label to "Wrong username and/or password. Please try again"
if he tries to access a restricted page, I redirect with /login?msg=nouser, etc.
Now I'm guessing this is caused by the extensionless urls, but have no idea what to do about it.
Help me :)
Thank you!
-Elad
Hi
Are you talking about removing extension from url, like login.aspx to login only? If so you can change it by setting umbracoUseDirectoryUrls value true in web.config file.
Thanks
Pnima
Hi Elad
If you want to go extensionless then what Pnima writes above should solve your issue.
But I'm a bit curious about why you're checking it this way? Why don't you take advantage of Umbraco being based on the standard ASP.NET mebership provider? When you create a membertype and assign it to a membergroup you can then set access restrictions on the nodes in Umbraco by using "public access". Then you can select that it should be based on groups and then select your login page and your error page.
/Jan
@Jan - You are right. My issue is not with going extensionless, I'm already using that.
My issue is with extensionless and query strings, but I also resolved that on my own.
On the other hand, I was thinking about your other comment and implemented the same behavior with the "public access" options.
My issue is that the login page does not display a message like "You need to log in to access the requested page"
or something like that. Is there any way to display a proper error message in the login control?
Hi Elad
How have you made your login setup? Normally it should be possible to enter that message in a rich text editor on the login page for instance and then place the login box in the rte by inserting a macro for instance.
Does it make sense?
/Jan
I found the solution.
I added the login control in the template (master page) for the login page already. I found that you can handle the onloginerror event
and display whatever error you want. This is exactly what I was looking to do.
http://www.aspnettutorials.com/tutorials/controls/howto-errors-login-asp4-csharp.aspx
Hi Elad
Ah, obviously I misunderstood what you were saying. Did not get that you needed to display a custom error message. Good to see you figured it out.
/Jan
Please give me suggestion that how can I achive extentionless with querystring url.
e.g : http://localhost/default.aspx?p=1.1
I want to display this url as http://localhost/default/p/1.1
Thanks in advance.
Hi Laijla
You should be able to do some url rewriting to achieve the above.
Try going to the config folder and open the urlrewriting.config file - it contains an example on how to do the above. Must admit that I'm not a wizard in url rewriting myself though - but try having a look at it and see if it makes sense :)
/Jan
is working on a reply...