Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Products and/or Services Offered (http://www.greenguysboard.com/board/forumdisplay.php?f=6)
-   -   Ray's Webmaster School, Tip #241: Link local links locally (http://www.greenguysboard.com/board/showthread.php?t=22904)

raymor 2005-08-11 06:09 AM

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:


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:



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:




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!

SirMoby 2005-08-11 12:09 PM

I didn't know you were doing webmaster tips. Do you have an archive? :) Good to see you here.

juggernaut 2005-08-11 12:09 PM

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.

cd34 2005-08-11 01:16 PM

another use for as well.


All times are GMT -4. The time now is 12:28 PM.

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