ASP/.NET Web Hosting
* 3 Months FREE *
CLICK HERE!
 CoverYourASP --> The base href tag

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
148 active users
10205 visitors today
11043 pages today
how is this done?
ASP.NET Showcase
ASP.NET Graph and Chart Component with FREE developer version

ASP.NET Shopping Cart and E-commerce Control with FREE trial download

ASP.NET Web Hosting with free month and setup

$15 Domain Name Registration from .DNR.
As seen on these sites
Special thanks go to the sites that support me by publishing my articles.
See more

CoverYourASP
Copyright © 1999-2008 James Shaw.
All rights reserved.

ASP.NET Blog
ASPRSS
ShawThing

Now open source with SourceForge!

Some history (if you're interested!)

I have tried various methods of maintaining the links to pages on my web site. Initially, all links were relative, not absolute, so I would use:

<a href="Hello.asp">go to my hello page</a>

instead of:

<a href="http://CoverYourASP.com/Hello.asp">go to my hello page</a>

This made it easy to move pages between my development server at home and the production server hosted by my ISP.

Unfortunately, I then had a problem with my 404 error handler when some spiders crawled the site. It's a long story, but they would cause the relative links on my pages to be applied from non-existant folders, causing an infinite loop of 404 errors!

So I then "fixed the problem" by using absolute links in the header and footer - no matter how the 404 was generated it would always show spiders the same absolute links.

But that made it difficult to use on my development machine, and yours. All the links in the header and footer pointed to the real CoverYourASP site!

Part 2: Using <base href>...

Featured sponsor
My favorite resources

Selling products online - read how James does it now



New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!


Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!