fixing web address

A

Andrew Urquhart

FH said:
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.
 
M

Mark Parnell

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. :)
 
E

Erik Harris

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.
 
C

Cameron

Erik said:
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
 
E

Erik Harris

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.
 
F

FH

Erik;

i tried naming it managers/index.html

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

Cameron

FH said:
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
 
E

Erik Harris

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.
 
T

Toby A Inkster

Erik said:
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.
 
E

Erik Harris

Erik Harris wrote:
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.
 
T

Toby A Inkster

Erik said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top