This project is read-only.

self redirect

Mar 14, 2009 at 12:32 AM
Found a bug/feature ;) in the N2 routing engine
Request.Url.ToString() - this code provides redirect
http://festival:81/requests/volunteer.aspx -> http://festival:81/Templates/UI/Views/Volunteer/VolunteerForm.aspx?page=212
And lets try to delete page=212 from the url..... oups, nsavigation and other interactive elements from zones has disappeared.

1) how can i get url before rewriting( the first one)
2) i think that deleting page from the url in second case should fire 404
Mar 14, 2009 at 11:57 AM
1) this is usually harvested from the Url property of each content item
2) i realize this might cause confusion but I'm a bit afraid of breaking some odd scenario doing this. you coud fix it yourself by throwing a HttpException(404) if the CurrentPage property is null.