Greenguy's Board


Go Back   Greenguy's Board > Products and/or Services Offered
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-08-11, 06:09 AM   #1
raymor
The only guys who wear Hawaiian shirts are gay guys and big fat party animals
 
Join Date: Jan 2004
Posts: 178
Send a message via ICQ to raymor
Ray's Webmaster School, Tip #241: Link local links locally

This is one of those little tips I've been posting
for many years and most professional webmasters
know it, but I still come across a few sites where
people have put in a lot of extra effort or run
into a big hassle because they didn't know
about local links:

Let's say your web pages currently link to each other
with long ass links that look something like this:
<a href="http://www.somehotyoungbabe.com/members/">

Let's say some day you bought ahotbabe.com or for
some reason you copied your site over to somehotyoungbabe.net
also. With the links like you have them now you'd
have to change all of your links to put in the new
domain name. Or, perhaps you copied and pasted just
a small part of one of your pages to another site
you started. Again, all of the links would be pointing
to the wrong domain name and you'd have to change them.
To avoid this hassle, most professional webmasters leave
the domain name out of the link entirely, like this:

<href="/members/">

This also has the advantage that it's a lot shorter
to type, so adding new links is faster. Here are the
two links together for comparison:

<href="http://www.somehotyoungbabe.com/members/">
<a href="/members/">

Both links work the same way, but the second form is
a lot faster, more portable, and makes your source code
easier to read.

If you missed last week's tip, here's a review:
This is the URL of a FILE named "members":
http://www.somehotyoungbabe.com/members
With a slash on the end, it's a DIRECTORY URL:
http://www.somehotyoungbabe.com/members/

If you leave the ending slash off of directory names
Apache can SOMETIMES detect your error and
redirect the user to the correct URL, but that
takes extra time and server load, and it doesn't
always work. So always remember, directory URLs
end with a slash!
__________________
Ray Morris
support@bettercgi.com
Strongbox/Throttlebox & more
TXDPS #A14012
raymor is offline   Reply With Quote
Old 2005-08-11, 12:09 PM   #2
SirMoby
Jim? I heard he's a dirty pornographer.
 
SirMoby's Avatar
 
Join Date: Aug 2003
Location: Washington, DC
Posts: 2,706
I didn't know you were doing webmaster tips. Do you have an archive? Good to see you here.
SirMoby is offline   Reply With Quote
Old 2005-08-11, 12:09 PM   #3
juggernaut
Registered User
 
juggernaut's Avatar
 
Join Date: Apr 2005
Location: Central Jersey! If I was rich and powerful I would dress as my avatar does.
Posts: 1,448
Send a message via Yahoo to juggernaut
LOL I saw the title of this and thought it was another one of those scripts to get the members here to look at the post. Ray is my name lol.
juggernaut is offline   Reply With Quote
Old 2005-08-11, 01:16 PM   #4
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
another use for <base href="http://fulldomain.com/"> as well.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:08 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc