I built a simple ASP.NET website which has a menu with all the page URLs linked to each menu item. when I click on a menu item the page URL appears in address bar like "http://mywebsite/xyz/webform1.aspx". I would like to hide this page url and instead show only URL of the website like "http://mywebsite" for all pages. Please let me know how this can be achieved. thanks in advance. if this is too complicated to achieve, then is it possible to show a fake url in place of actual url for each page? I don't want to show the actual page name in the url.

Recommended Answers

All 3 Replies

The only method that I am aware of to accompish this is by using the server.transfer() method. Not too sure how or why you would incorporate this into your project.

For one, this would be really bad for SEO. Any web crawler that crawls you site would see every page with the same URL. That's not a good idea if you want your site/pages to be properly indexed and ranked.

I am not too sure that URLRewriting is going to help in this situation. The poster is asking about having every URL written as http://mywebsite. URLRewriting can be used to take information after the hostname and re-write it to something else. For example default.aspx?bookID=2354 would be rewritten as /books/2354/. It sounds to me like the poster is asking to "mask" every URL to just the hostname.

Some clarification from the poster would be good.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.