Jump to content

Recommended Posts

i am trying to understand, how a site like ebay can display content and be case insensitive?
for example:
 

The original url:

http://www.ebay.co.uk/itm/Toshiba-Satellite-C50-AMD-E-Series-1-4GHz-Dual-Core-15-6-Inch-500GB-2GB-Laptop/151458954958

the above works fine and go to the intended page.

user editing the browser url into lowercase :

http://www.ebay.co.uk/itm/toshiba-satellite-c50-amd-e-series-1-4ghz-dual-core-15-6-inch-500gb-2GB-laptop/151458954958

random uppercase and lowercase.

http://www.ebay.co.uk/itm/toshiba-sateLLite-c50-aMd-e-sERIes-1-4ghz-dual-core-15-6-inch-500gb-2GB-laptop/151458954958

both the urls above also work fine and go to the intended page.

 

How can such a thing can work? it is supposed to throw an error such as page not found and the like?

any thoughts welcome.

Link to comment
https://forums.phpfreaks.com/topic/293379-url-question/
Share on other sites

Everything in a url is case sensitive, browsers will lower the domains though.

So if is a path/folder/file should always do them proper case.

 

What you see there is not a real location but added into the url for seo purposes, as requinix said they probably just use the id.

 

Could be a fancy rewrite rule and the url could look something like this

http://www.ebay.co.uk/?itm=toshiba-satellite-c50-amd-e-series-1-4ghz-dual-core-15-6-inch-500gb-2GB-laptop&id=151458954958

The parameters would be able to be uppercased for display and lowercased for usage.

 

Edit:

Yes this works the same

http://www.ebay.co.uk/itm/151458954958

Edited by QuickOldCar
Link to comment
https://forums.phpfreaks.com/topic/293379-url-question/#findComment-1500822
Share on other sites

  • 1 month later...

But I believe Requinix is correct and they are going by the ID at the end.

http://www.ebay.co.uk/itm/some-crap-here/151458954958

loads the same content as the original.

http://www.ebay.co.uk/itm/Toshiba-Satellite-C50-AMD-E-Series-1-4GHz-Dual-Core-15-6-Inch-500GB-2GB-Laptop/151458954958
Edited by CroNiX
Link to comment
https://forums.phpfreaks.com/topic/293379-url-question/#findComment-1505562
Share on other sites

  • 2 weeks later...

People create uppercase or mix case URLs mainly for branding or SEO purpose.Sometimes they  do this for better readability.Generally it should throw exceptions while user request with URLs not matching the case. But this is avoided by adding some rules in either in .htaccess file or using RewriteMap in httpd.conf^.Second one is less complex and works faster.

Link to comment
https://forums.phpfreaks.com/topic/293379-url-question/#findComment-1506525
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.