Re: "Normalize" a URL
Re: "Normalize" a URL
- Subject: Re: "Normalize" a URL
- From: "Filipe Cabecinhas" <email@hidden>
- Date: Sun, 28 Jan 2007 12:11:38 +0000
On 1/28/07, Jerry Krinock <email@hidden> wrote:
1) Last path component "/index.html" or "/index.htm" is changed to "/".
You don't want this. You don't know what the priorities of the
webserver are. What if your URL is "/index.html" but the default the
webserver sends is "index.php"? You would remove the "index.html" from
the URL and, when you tried to read the page, you would get
"/index.php" and not "/index.html". Yes, it's a weird thing to
happen... But you can't garantee it won't happen. ;-)
3) Any uppercase letters are converted to lowercase.
You don't know if the server is case-sensitive. For example (this is
the only URL I know this happens):
http://www.sonymusic.com/artists/PearlJam
http://www.sonymusic.com/artists/Pearljam
The first one goes to the page. The second one gives a 404.
5) An empty query, that is, a "?" at the end of a URL, is removed.
I don't know if in PHP there's any difference between not passing a
query and passing an empty query (there may be differences)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden