Hi, I am developing a social bookmarking application. Currently I am working on Link Submit Module. The Objective: User can not submit duplicate URLs. Solution: A URL can be written in the following 2 ways: http://www.yoursite.com http://yoursite.com There may be "/" present in the last. e.g. http://yoursite.com/ I have written a script in javascript for removal of "/" from the last and removal of http://www and http:// from the beginning. "http://www" will be automatically added when end user will see URL. This will make URL look like yoursite.com it means if user added http://yoursite.com then he/she will not able to add http://www.yoursite.com. Because in the database it will become yoursite.com. Question I want to know that is this possible that http://yoursite.com and http://www.yoursite.com become different? Is "/" in the last necessary? Please Help.
/ at end is not necessary avoid it yes its possible to show different content for www and non-www using .htaccess Regards Alex
As kmap pointed out, www. server.com may be different from server.com or *. server.com, depending on the web servers configuration. A single / might be neglected, but // can make a difference to www. server.com/ and www. server.com// might link to different kind of content as well.
Yup as already mentioned "/" is not necessary, but presence/absence of www is definitely important, for some www is important but others may prefer w/o www. I don't use www in my weblog !