Greenguy's Board


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

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 02:45 PM.


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