Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Junior Member
    Join Date
    Oct 2003
    Location
    MI
    Posts
    3
    Member #
    3623
    What can I do to remove the trailing "/" on a URL? (For example, click here )

    It says "http://www.w3.org/Help/siteindex" in the URL part of my browser. On my web site, if I try that, I get something like "josiahmackenzie.com/guestbook/".

    How do I remove that trailing slash (/)?

    Thanks,
    Josiah

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Trailing slash is a proper URL referencing a folder. If you don't want the trailing slash, reference a document.

  4. #3
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    I believe it is a setting in your web server, if I understand the question correctly.
    JR

  5. #4
    Junior Member
    Join Date
    Oct 2003
    Location
    MI
    Posts
    3
    Member #
    3623
    Originally posted by transio
    Trailing slash is a proper URL referencing a folder. If you don't want the trailing slash, reference a document.
    How can I reference a document?

  6. #5
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    he means - www.yoursite.com/index.html for referencing a document i think, whereas www.yoursite.com/thisfolder/ is referencing a folder.
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  7. #6
    Senior Member nocloset's Avatar
    Join Date
    Sep 2003
    Posts
    108
    Member #
    3228
    Forgive me if this is too elementary, but maybe it will help someone.

    When you visit a web site, you are always looking at a document. If you specify the document name, such as

    www.yoursite.com/myphotos.html

    that's what you'll see. If you do not specify a document name, the web server is set up to search for certain default documents, in order, until it finds one. Typically, index.html, index.htm, home.html, home.htm, default.html, default.htm.... are some examples that most web servers will look for. If you see the slash, it means that no file name was specified, and the default file is displayed.

    I hope that helps. If I didn't explain it correctly, someone please clarify.

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Your web server can be set up to display a directory list of contents in the folder by default. In that regard, you can look at a folder rather than a document.

  9. #8
    Senior Member nocloset's Avatar
    Join Date
    Sep 2003
    Posts
    108
    Member #
    3228
    Yes of course you are right transio. Sorry for the misstatement.

  10. #9
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    ;-)

  11. #10
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Either way, the point is that Transio is right (OMG!). It is proper HTTP specification to include a trailing slash when listing a directory. For example, http://domain/path would try to load the file called "path" in the root web directory. http://domain/path/ would attempt to access the proper DirectoryIndex file (in the case of Apache), or display a listing of the directory's contents.

    When making links, always include the slash if appropriate. I read in a book a while back that it can put more load on the server if everybody constantly refused to use slashes.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:57 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com