fixing web address

Discussion in 'HTML' started by FH, Mar 3, 2004.

  1. FH

    FH Guest

    http://www.fabriclean.biz/managers.html

    how do i fix my site so that it doesn't show the .html at the end of the web
    site address? what am i doing wrong? ( i'm doing html manually ).


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.587 / Virus Database: 371 - Release Date: 2/12/04
    FH, Mar 3, 2004
    #1
    1. Advertising

  2. FH wrote:
    > http://www.fabriclean.biz/managers.html
    >
    > how do i fix my site so that it doesn't show the .html at the end of
    > the web site address? what am i doing wrong? ( i'm doing html
    > manually ).


    I take it you mean you want URLs of the form:

    http://www.fabriclean.biz/managers/

    In which case create the managers directory then work out what the
    supported default documents are for the web server you're using. Almost
    certainly one of these is "index.html", in which case take file
    "managers.html" rename it to "index.html" and put it in your new folder.

    If you didn't mean the above, then you've lost me as nothing is broken.
    --
    Andrew Urquhart
    Reply: www.andrewu.co.uk/about/contact/?subject=Re: alt.html
    Andrew Urquhart, Mar 3, 2004
    #2
    1. Advertising

  3. FH

    Mark Parnell Guest

    On Wed, 03 Mar 2004 00:03:38 GMT, "FH" <> declared
    in alt.html:

    > http://www.fabriclean.biz/managers.html
    >
    > how do i fix my site so that it doesn't show the .html at the end of the web
    > site address? what am i doing wrong? ( i'm doing html manually ).


    If your web server is using Apache, you can do it using MultiViews
    (assuming your host allows it) - just set all your links to go to
    http://www.fabriclean.biz/managers and the server will automatically
    send the .html page.

    Then if you ever rename the page to e.g. managers.php, you don't have to
    change your links. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Mar 3, 2004
    #3
  4. FH

    Erik Harris Guest

    On Wed, 03 Mar 2004 00:03:38 GMT, "FH" <> wrote:

    >http://www.fabriclean.biz/managers.html
    >
    >how do i fix my site so that it doesn't show the .html at the end of the web
    >site address? what am i doing wrong? ( i'm doing html manually ).


    Usually, a server will only hide the filename of an "index.html" file in a
    given directory. So "index.html" would be rendered when someone goes to
    "www.fabriclean.biz". If you want them to go to www.fabriclean.biz/managers/
    then you need to rename managers.html to managers/index.html

    If that's not what you're asking, you've lost me. :)

    --
    Erik Harris n$wsr$ader@$harrishom$.com
    AIM: KngFuJoe http://www.eharrishome.com
    Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/

    The above email address is obfuscated to try to prevent SPAM.
    Replace each dollar sign with an "e" for the correct address.
    Erik Harris, Mar 3, 2004
    #4
  5. FH

    Cameron Guest

    Erik Harris wrote:
    > On Wed, 03 Mar 2004 00:03:38 GMT, "FH" <> wrote:
    >
    >
    >>http://www.fabriclean.biz/managers.html
    >>
    >>how do i fix my site so that it doesn't show the .html at the end of the web
    >>site address? what am i doing wrong? ( i'm doing html manually ).

    >
    >
    > Usually, a server will only hide the filename of an "index.html" file in a
    > given directory. So "index.html" would be rendered when someone goes to
    > "www.fabriclean.biz". If you want them to go to www.fabriclean.biz/managers/
    > then you need to rename managers.html to managers/index.html
    >
    > If that's not what you're asking, you've lost me. :)
    >


    Only index.html? not quite, ya got

    index.htm, default.htm, default.asp, index.asp, index.php,
    index.shtml...need I continue, granted some of these depend on the
    features on the server but most servers use more than just index.html

    ~Cameron
    Cameron, Mar 3, 2004
    #5
  6. FH

    Erik Harris Guest

    On Wed, 03 Mar 2004 01:00:47 +0000, Cameron <> wrote:

    >Erik Harris wrote:
    >> On Wed, 03 Mar 2004 00:03:38 GMT, "FH" <> wrote:
    >>
    >>
    >>>http://www.fabriclean.biz/managers.html
    >>>
    >>>how do i fix my site so that it doesn't show the .html at the end of the web
    >>>site address? what am i doing wrong? ( i'm doing html manually ).

    >>
    >>
    >> Usually, a server will only hide the filename of an "index.html" file in a
    >> given directory. So "index.html" would be rendered when someone goes to


    >Only index.html? not quite, ya got


    I did specify "usually." The servers I've used have always required
    index.html, except for one, which also accepted index.htm. If the servers
    I've used do accept other filenames, they haven't been publicized.

    The point is that if he doesn't want the filename displayed, he needs to
    rename the file, and index.html is his best bet.

    --
    Erik Harris n$wsr$ader@$harrishom$.com
    AIM: KngFuJoe http://www.eharrishome.com
    Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/

    The above email address is obfuscated to try to prevent SPAM.
    Replace each dollar sign with an "e" for the correct address.
    Erik Harris, Mar 3, 2004
    #6
  7. FH

    FH Guest

    Erik;

    i tried naming it managers/index.html

    but it wouldn't allow it. i'm thinking the / symbol prevents it?

    > Usually, a server will only hide the filename of an "index.html" file in a
    > given directory. So "index.html" would be rendered when someone goes to
    > "www.fabriclean.biz". If you want them to go to

    www.fabriclean.biz/managers/
    > then you need to rename managers.html to managers/index.html
    >
    > If that's not what you're asking, you've lost me. :)
    >
    > --
    > Erik Harris n$wsr$ader@$harrishom$.com
    > AIM: KngFuJoe http://www.eharrishome.com
    > Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/
    >
    > The above email address is obfuscated to try to prevent SPAM.
    > Replace each dollar sign with an "e" for the correct address.



    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.587 / Virus Database: 371 - Release Date: 2/12/04
    FH, Mar 3, 2004
    #7
  8. FH

    Cameron Guest

    FH wrote:
    > Erik;
    >
    > i tried naming it managers/index.html
    >
    > but it wouldn't allow it. i'm thinking the / symbol prevents it?
    >
    > <snip>


    You don't name the file managers/index.html, you rename managers.html to
    index.html, then you create a folder/directory called managers and put
    index.html into it.


    ~Cameron
    Cameron, Mar 3, 2004
    #8
  9. FH

    Erik Harris Guest

    On Wed, 03 Mar 2004 01:56:36 GMT, "FH" <> wrote:

    >Erik;


    >i tried naming it managers/index.html
    >
    >but it wouldn't allow it. i'm thinking the / symbol prevents it?


    You'll need to create a managers directory first. Sorry, I should have been
    more explicit about that notation. I was thinking in terms of command lines,
    and was one step ahead of myself ("mkdir managers; mv managers.html
    managers/index.html" would work in a *NIX type environment, for example).

    How exactly you do that will depend on what interface you're using (a command
    line ftp, a GUI ftp, Windows Explorer and a locally-hosted web server, etc).
    However you do it, create a "managers" directory, and put the file in there,
    calling it index.html. Then point your web browser to
    http://www.fabriclean.biz/managers/ (chances are, the tailing "/" won't be
    necessary, but that depends on your web server. I believe I have seen some
    that require it).

    --
    Erik Harris n$wsr$ader@$harrishom$.com
    AIM: KngFuJoe http://www.eharrishome.com
    Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/

    The above email address is obfuscated to try to prevent SPAM.
    Replace each dollar sign with an "e" for the correct address.
    Erik Harris, Mar 3, 2004
    #9
  10. Erik Harris wrote:

    > http://www.fabriclean.biz/managers/ (chances are, the tailing "/" won't be
    > necessary, but that depends on your web server. I believe I have seen some
    > that require it).


    They *all* require it. Why?

    Consider that "managers/index.html" loads an image like this:

    <img src="phb.gif" alt="My Manager">

    If your URL is "http://www.fabriclean.biz/managers/", then the browser
    will try to load the image from "http://www.fabriclean.biz/managers/phb.gif",
    but if the URL is missing the slash, then the browser will try to load the
    image from "http://www.fabriclean.biz/phb.gif". So you see the problem if
    the slash is missing? It *completely* changes the object of relative URLs.

    For this reason, many web servers are configured to *redirect* requests to
    directories without a slash towards their slashy counterparts.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Mar 3, 2004
    #10
  11. FH

    Erik Harris Guest

    On Wed, 03 Mar 2004 08:11:29 +0000, Toby A Inkster
    <> wrote:

    >Erik Harris wrote:


    >> http://www.fabriclean.biz/managers/ (chances are, the tailing "/" won't be
    >> necessary, but that depends on your web server. I believe I have seen some
    >> that require it).


    >They *all* require it. Why?


    No, they don't. Regardless of your "why", try going to
    http://www.eharrishome.com/cimac and http://www.eharrishome.com/cimac/

    Both go to the exact same place. Both redirect you to
    http://www.eharrishome.com/cimac/index.html (actually, the domain redirects
    you to my homepage on my ISP's server, and the /cimac redirects you to
    /cimac/index.html).

    >For this reason, many web servers are configured to *redirect* requests to
    >directories without a slash towards their slashy counterparts.


    In other words, they don't require you to use the trailing slash, just as I
    said above. You say "*redirect*" like it's something special. These are all
    redirections to an index.html file, regardless of whether the server requires
    the user to include a trailing slash, aren't they? After all,
    "http://www.url/" doesn't go to "http://www.url/." unless there's no
    index.html file (or any other filename that the web server is programmed to
    direct to). Your technicality about what happens beneath the surface is
    irrelevant to the user. It's like insisting that a green car isn't green
    simply because there's a coat of red paint below three coats of green. It's
    still a green car.

    Are you being contrary just for the sake of being contrary, or are you trying
    to show off your "superior intelligence" by proving me wrong and then
    finishing up with a sentence telling me I'm actually right? ;-) If you want
    to bang your chest and show that you know more about network operations than
    me, I'll concede right now. I don't make any claims to expertise, nor do I
    have any right to.

    --
    Erik Harris n$wsr$ader@$harrishom$.com
    AIM: KngFuJoe http://www.eharrishome.com
    Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/

    The above email address is obfuscated to try to prevent SPAM.
    Replace each dollar sign with an "e" for the correct address.
    Erik Harris, Mar 3, 2004
    #11
  12. Erik Harris wrote:

    > On Wed, 03 Mar 2004 08:11:29 +0000, Toby A Inkster
    > <> wrote:
    >
    >>Erik Harris wrote:

    >
    >>> http://www.fabriclean.biz/managers/ (chances are, the tailing "/" won't be
    >>> necessary, but that depends on your web server. I believe I have seen some
    >>> that require it).

    >
    >>They *all* require it. Why?

    >
    > No, they don't. Regardless of your "why", try going to
    > http://www.eharrishome.com/cimac and http://www.eharrishome.com/cimac/
    >
    > Both go to the exact same place. Both redirect you to
    > http://www.eharrishome.com/cimac/index.html (actually, the domain redirects
    > you to my homepage on my ISP's server, and the /cimac redirects you to
    > /cimac/index.html).


    http://www.eharrishome.com/cimac/index.html
    http://www.eharrishome.com/cimac/
    http://www.eharrishome.com/cimac

    All 3 of these are different places. They could all contain potentially
    different pages. In this particular case, they all contain HTTP redirects
    to various other places, so this isn't the best example.

    Instead, how about:

    http://www.goddamn.co.uk/tobyink/scratch/urls/index.html
    http://www.goddamn.co.uk/tobyink/scratch/urls/
    http://www.goddamn.co.uk/tobyink/scratch/urls

    All are different pages and contain different content.

    > Are you being contrary just for the sake of being contrary, or are you trying
    > to show off your "superior intelligence" by proving me wrong and then
    > finishing up with a sentence telling me I'm actually right? ;-)


    I'm being contrary to educate people into using the correct URLs, because
    as my example above shows, if you miss off slash characters from the end
    of directory names you could be linking to an entirely different document.

    And even if the server was configured to redirect the slashless URL to the
    slashy one (which most are), you've just caused the browser and extra
    round-trip to the server for the redirect and wasted the visitor's and
    your own bandwidth.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Mar 4, 2004
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MS News

    Fixing an Id for a HTML Tag

    MS News, Jul 29, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    325
    Vincent V
    Jul 30, 2003
  2. Daves
    Replies:
    4
    Views:
    478
    Daves
    Mar 10, 2005
  3. =?Utf-8?B?QW5nZWw=?=

    Pass a Web Address and return a File System Address

    =?Utf-8?B?QW5nZWw=?=, Sep 20, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    532
    =?Utf-8?B?U3RldmUgQy4gT3Jy?=
    Sep 21, 2005
  4. Saket Mundra

    Customizing & fixing Web form window size

    Saket Mundra, Apr 22, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    116
    Saket Mundra
    Apr 22, 2005
  5. Saket Mundra

    customizing and fixing web form window size ?

    Saket Mundra, Apr 22, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    111
    Saket Mundra
    Apr 22, 2005
Loading...

Share This Page