Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 18th, 2006, 07:23 AM
Authorized User
 
Join Date: Feb 2006
Location: Ahmedabad, Gujarat, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default How to hide Extension of Page in URL ?

Hi,
How can we hide extension of a page in URL?
I saw this in Yahoo.com....I don't know that is it the name of page or
they have used Server.Transfer ?
Using server.transfer I don't think extension of the page can be mad invisible..It may be possible that even page name is not being displayed..It shows just folder name....
Can anyone explain how to do this??


Savan
__________________
Savan
  #2 (permalink)  
Old February 18th, 2006, 09:01 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Location: , , Canada.
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could you give an example of what you saw on Yahoo?

- A.Kahtava
  #3 (permalink)  
Old February 20th, 2006, 08:19 AM
Authorized User
 
Join Date: Feb 2006
Location: Ahmedabad, Gujarat, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

There are a lot of links on Yahoo like Movies,Music,News,My yahoo,Spotrs,Travel,TV ....etc.
When u drag your mouse over these links,in browser the link is displayed.
Now when u click on any link on www.yahoo.com...& see the URL of the new page.
U can not see extension of the page like .aspx or .asp or .php...
For example,
http://mail.yahoo.com/?.intl=us
http://sports.yahoo.com/olympics/tor...ia-dopingraids
How this can be done??


Savan
  #4 (permalink)  
Old February 21st, 2006, 12:27 AM
Authorized User
 
Join Date: Dec 2005
Location: bangalore, karnataka, India.
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to g_vamsi_krish
Default

These are not hyperlinks. check them carefully.


vamsi
  #5 (permalink)  
Old February 21st, 2006, 11:27 AM
Authorized User
 
Join Date: Feb 2006
Location: Ahmedabad, Gujarat, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

I think all those are hyperlinks.
How can u say that they r not Hyperlinks?
Pls tell me briefly...& If not how is it possible to make such links & URLs without extension of page?

Savan
  #6 (permalink)  
Old February 21st, 2006, 12:54 PM
Imar's Avatar
Wrox Author
Points: 72,045, Level: 100
Points: 72,045, Level: 100 Points: 72,045, Level: 100 Points: 72,045, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,083
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

No hyperlinks?? I don't get that either.

Anyway, this is probably done by what is generally referred to as a "default document".

A web server (IIS, Apache and so on) can be configured to support one or more default documents.

When a browser requests a folder / page without a filename and extension, the web server sends back a list of supported default documents. The browser picks one and rerequests the page.

So, on an IIS web site with .NET configured, the default document is Default.aspx. You can access folders that contain that file by simply browsing to the folder name.

Let's say you have an app located at http://localhost/SomeFolder

On disk, the SomeFolder (at c:\inetpub\wwwroot\SomeFolder) contains a file called Default.aspx. When you browse http://localhost/SomeFolder, you actually get the file Default.aspx.
So there is no difference between

http://localhost/SomeFolder


and

http://localhost/SomeFolder/Default.aspx

You can configure the web server to support other default documents as well.

In addition to default documents, the same feature can also be accomplished with URL rewriting, a bit more advanced subject...

Does this clarify things?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #7 (permalink)  
Old February 22nd, 2006, 01:27 AM
Wrox Technical Editor
 
Join Date: Dec 2005
Location: , , Canada.
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As Imar said; this is done through a process called URL Re-writing or URL Mapping and the use of Default documents...

URL Re-writing allows you to map a URL (http://localhost/SomeFolder/HomePage/) to a document (http://localhost/SomeFolder/Default.aspx?page=HomePage).

URL Re-writing is supported on most web servers at the ISAPI layer; however you can Re-write URL’s at the ASP.NET layer, through the HTTP modules or HTTP handlers.

Here are some links…
  URL Re-writing for:
    ASP.NET v2.0: http://www.urlrewriting.net/en/
    ASP.NET v1: http://msdn.microsoft.com/library/de...lrewriting.asp

URL Re-writing became popular through Apache's mod_rewrite module and has since then been introduced to IIS and ASP.NET.

On a side note, I’ve been experimenting with Ruby (a popular programming language here in Japan) on Rails (a web development framework). Ruby on Rails builds it's modules / components around these friendly URLs. Rails is pretty interesting and will have it's place on the net; however it certainly doesn't measure up to ASP.NET.
If you see an .rhtml extension on the web there is a good chance you’re looking at a website designed with Ruby on Rails…


- A.Kahtava
  #8 (permalink)  
Old February 23rd, 2006, 01:12 AM
Authorized User
 
Join Date: Feb 2006
Location: Ahmedabad, Gujarat, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

Hi Friends,
Thanks a lot for your Support.
I got it.But there is one more issue.
If there are two pages in one folder & suppose both are configured to be Default page in IIS.Then the first page configured in IIS is executed.
Now referring to Yahoo.com,
Can u tell me How is the Folder structure of it??
I think there are multiple folders & links on home page redirects to a page in a folder,because having multiple default pages in one folder is not possible if I m correct.
Please Comment on this.
Thanks

Savan
  #9 (permalink)  
Old February 23rd, 2006, 01:54 AM
Wrox Technical Editor
 
Join Date: Dec 2005
Location: , , Canada.
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes; only one default page can be set, and only one default page will be executed when calling the page through a directory (example: http://localhost/).

You can have your default.aspx (or whatever file you have set as default) load it’s content based on query strings.
For example: http://localhost/?page=hello and http://localhost/?page=world could be accessing the same default file, but both query strings could load different content.

Now; referring to www.yahoo.com.
I couldn't tell you what their directory structure looks like, but I would guess that www.yahoo.com is serving you content through a combination of query strings and URL Re-Writes.
Yahoo wants you to think there are multiple folders involved when displaying their content, but in reality there may be one large query string and a single directory.
Yahoo wants to present a façade to you, they want you to perceive that their site as a series of directories because it makes it easier for us to understand (increases usability).


- A.Kahtava
  #10 (permalink)  
Old February 24th, 2006, 10:31 AM
Authorized User
 
Join Date: Feb 2006
Location: Ahmedabad, Gujarat, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

Thanks Adam.
Your information proved to be very useful for me.
Thanks a lot for Help.
You mentioned Ruby on Rails.I heard a lot about this.But I want some more info regarding Ruby on rails. If you have some more information or simple application in Ruby on rails, can you please mail me on savan_thakkar@redifmail.com.

Thanks

Savan
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page and URL Structure hugh@kmcnetwork.com ASP.NET 2.0 Professional 2 October 7th, 2007 07:56 AM
cannot hide page in sitemap using roles hertendreef ASP.NET 2.0 Professional 2 August 21st, 2007 12:56 PM
Hide pagename in url cholletivinod ASP.NET 2.0 Basics 10 August 14th, 2007 05:23 AM
Front Page server extension error NWilson Assembly Language 1 January 17th, 2006 01:55 PM
Conditional Hide Report Page Header SGL Access VBA 0 August 30th, 2004 02:36 PM



All times are GMT -4. The time now is 06:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.