Last post Jul 21, 2008 06:10 AM by Zhao Ji Ma - MSFT
Jul 16, 2008 11:14 PM|napstulik7|LINK
I have successfully implemented url rewrite. However I have this problem.
I’m trying to build a virtual folder structure like “categories/1/Cars/5/ford/”. Only 2 levels for now.
With this querystring url : ~/categories/default.aspx?rid=1&rname=cars&sid=5&sname=ford
I populate submenu with request.params(“rid”) and request.params(“rname”) based on the root id.
When I’m inside the virtual path of categories/1/Cars/5/ford/ and I request.params(“rid”), my aspx page gives an error on the “/”, because request.params(“rid”) equals to the entire
params path of “1/Cars/5/ford/” and not to the value of 1 for the root category Cars.
Ultimately, I just want to build the path like this “categories/Cars/ford/” without even showing the actual ID, but I can’t seem to pass the param.
I hope someone can help me,
Thank you in advance,
Jul 18, 2008 11:11 AM|Peter Bucher|LINK
1. What is your current issue, i don`t see clearly the Problem. e.g. show some Code
2. If you want to build paths without a ASP.NET Extension (e.g. .aspx / .ashx / ...), you have to configure iis up for this.
Jul 18, 2008 11:52 AM|napstulik7|LINK
Thank you for your help,
IIS is set up, and extensionless pages work. However, the request.params are not working right.
This is web.config
The first page works like this domain/1/cars/
But if I try to navigate to the second page domain/1/cars/4/ford, my request.params("c_id") sees not value "1", but value of "1/cars/", combination of all params. So I cannot pupulate the appropriate data based on params.
I want to generate virtual paths without revealing the category id as well.
Jul 19, 2008 01:34 AM|docluv|LINK
I never could get anything past the first parameter to work either in this situation. I put my parsing logic in the httpModule code, not in the configuration code. It worked out much better.
Jul 19, 2008 08:53 PM|napstulik7|LINK
Can you give me your sample code with httpModule please?
Jul 21, 2008 06:10 AM|Zhao Ji Ma - MSFT|LINK
Hope this sample helps.