I want users only to see www.domain.com whether they are on domain.com/about.aspx or any other pages, only domain.com should be visible in the url.
Hi on your home page you can put iframe and display ur site in that iframe. in this ur browser url will not change. But be sure iframe does not resize automatically so u need to do some javascript tweak for that.
It is much better practices to store names, paths and filenames in database and use “Global.asax”. By adding Module in “Application_Start” procedure in "Global.asax" and developing “routes” module in “App_Start”
with simple “while SqlDataReader.read” loop you can have updated paths. I already developed site with 450 pages (simple website of 15 pages who generate content) I didn’t notice any troubles.
This is really useful because of several reasons:
You can store page description and keywords so you can generate headers
You can simply change paths if you reorganize folders
You can simply add routes if you develop CMS system and user creates new pages
It is really easy optimize headers for SEO if content of page is changed
Member
14 Points
77 Posts
How can i hide file names ex. default.aspx in url after my domain name?
Mar 11, 2011 04:56 PM|xaviorinc|LINK
Is it possible to hide the file names ex: default.aspx after my domain name and is it recommended?
I want users only to see www.domain.com whether they are on domain.com/about.aspx or any other pages, only domain.com should be visible in the url.
Please let me know your suggestions
Cheers,
X.
All-Star
193993 Points
28025 Posts
Moderator
Re: How can i hide file names ex. default.aspx in url after my domain name?
Mar 11, 2011 05:31 PM|Mikesdotnetting|LINK
The recommended way is to use Routing:
http://chriscavanagh.wordpress.com/2008/03/11/aspnet-routing-goodbye-url-rewriting/
http://msdn.microsoft.com/en-us/library/cc668201.aspx
Member
198 Points
219 Posts
Re: How can i hide file names ex. default.aspx in url after my domain name?
Mar 11, 2011 05:34 PM|ASPProg232|LINK
You can use URL Routing in ASP.Net (4.0 supports Web Forms), or you can do it much easier in IIS7. Download URL Rewriting.
Participant
760 Points
305 Posts
Re: How can i hide file names ex. default.aspx in url after my domain name?
Mar 12, 2011 12:53 AM|shwetamber|LINK
Hi,
Please check this Blog post ?
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
Here you find the 3 Methods for Url Rewrite with simple code in web.config . It will helps to you.
Regards
Shwetamber Chourey
India
</div> </div>Participant
818 Points
283 Posts
Re: How can i hide file names ex. default.aspx in url after my domain name?
Mar 12, 2011 01:27 AM|Nandip Makwana|LINK
Hi on your home page you can put iframe and display ur site in that iframe. in this ur browser url will not change. But be sure iframe does not resize automatically so u need to do some javascript tweak for that.
Software Engineer by Profession, Learner by Passion!
Contributor
3390 Points
1079 Posts
Re: How can i hide file names ex. default.aspx in url after my domain name?
Mar 13, 2011 07:42 PM|kctt|LINK
What is the reason to show domain only in address bar?
People cannot bookmark specific link on your site if you mask all links with domain name only.
Member
14 Points
77 Posts
Re: How can i hide file names ex. default.aspx in url after my domain name?
Mar 17, 2011 01:13 AM|xaviorinc|LINK
That is a valid point, i did not think about that one.
Cheers,
X.
None
0 Points
7 Posts
Re: How can i hide file names ex. default.aspx in url after my domain name?
Jan 10, 2014 07:56 AM|SeniB|LINK
It is much better practices to store names, paths and filenames in database and use “Global.asax”. By adding Module in “Application_Start” procedure in "Global.asax" and developing “routes” module in “App_Start” with simple “while SqlDataReader.read” loop you can have updated paths. I already developed site with 450 pages (simple website of 15 pages who generate content) I didn’t notice any troubles.
This is really useful because of several reasons: