Hi all,
I have two problems all related to URL manipulation.
1. I am in the process of creating a network marketing website using ASP.NET 2.0. When user signs up, I want him to have his own replicated website. So at the moment each user get his "own replicated" website and the URL is www.mysite.com/default.aspx?id=username, that works fine however it is a bit ugly and would be hard to remember for an ordinary user. So I want them to give an URL in the form www.mysite.com/username , which would be easy to remember. A lot of websites do that. I have tried using <urlMapping> in web.config like that
<urlMappings enabled="true">
<add url="~/john" mappedUrl="~/Default.aspx?id=john"/>
</urlMappings>
It does work partially. It does redirect to that page, however there is a problem with my css styles. I have all my css files in App_Themes/DefaultTheme folder and in webconfig I set website Theme. However it doesn't seem to pick it up when I use urlMapping. I guess there is a problem with a virtual path. I have tried to explicitly set Theme in the Default.aspx by setting StylesheetTheme="DefaultTheme" and Theme="DefaultTheme", but that didn't help.
So can anyone help, maybe there is a better solution, as with this one even if I get css working I would need to put dynamically a lot of entries into the web.config for mapping. I know there is a way with url rewritting using RegEx. But i didn't really get it. Please help.
2. Second issue is that I want to hide page name. So I will have a link saying "Click Here", that redirects to www.mysite.asp/SignUp.aspx. However when it goes to that page, I don't want users to be able to see that page name in the address bar. But I dont want to hide or disable address bar. So when users click on the link "click here" it takes them to SignUp.aspx page but in the browser's address bar it should show www.mysite.com. I know there is a way with framesets, but I don't want to mess with framesets. So please, can anyone help.
Thanks a lot
Enter your message below
Sign in or Join us (it's free).