473,327 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Base Href problems

Hi all

I'm using W2k Pro, ASP 3, IIS 5 & DWMX 6.1 and code in VBSCRIPT

I currently use the <BASE href=XXXX> in all my pages and just read
that this tag is no longer supported so will soon vanish

I have a couple of sites that I'm working on and to make all my links
work right etc I need to use the base href tag

http://localhost/site1/
http://localhost/site2/
http://localhost/site3/

where online the base href would be

http://www.site1.com/
http://www.site2.com/
http://www.site3.com/

all my links are like <img src=images/mylogo.gif> or <a
src=info/info.asp>Info</a>
Now my problem is how else would I design my sites if I cant use the
Base href tag so the site would work both on LOCAL & REMOTE servers as
needed in the above paths?

I'm sure other people develop on a WIN 2k PRO system where you can
only have ONE site (c:\inetput\wwwrooot\) Which was fine when I only
had one site... but when I needed a second I had to change my first to
use the Base href so I could check the sites out locally (offline)
before uploading them to a live server.

any help would be most appreciated.

thanks

Al

Jul 19 '05 #1
3 4124
Harag wrote on 31 jul 2003 in microsoft.public.inetserver.asp.general:
I currently use the <BASE href=XXXX> in all my pages and just read
that this tag is no longer supported so will soon vanish

I have a couple of sites that I'm working on and to make all my links
work right etc I need to use the base href tag

http://localhost/site1/
http://localhost/site2/
http://localhost/site3/

where online the base href would be

http://www.site1.com/
http://www.site2.com/
http://www.site3.com/

all my links are like <img src=images/mylogo.gif> or <a
src=info/info.asp>Info</a>
Now my problem is how else would I design my sites if I cant use the
Base href tag so the site would work both on LOCAL & REMOTE servers as
needed in the above paths?

I'm sure other people develop on a WIN 2k PRO system where you can
only have ONE site (c:\inetput\wwwrooot\) Which was fine when I only
had one site... but when I needed a second I had to change my first to
use the Base href so I could check the sites out locally (offline)
before uploading them to a live server.


<%
If Left(Request.ServerVariables("HTTP_HOST"),8)="www. site" Then
basehref="http://"&Request.ServerVariables("HTTP_HOST")
Else if ..........
' sorry, don't know much about localhost
%>

<base href="<%=basehref%>">
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
If possible, get Windows 2000 Server. Either that, or you'll have to use
all relative paths without any base href or the usage of / to start from the
root. i.e.

<img src="../images/image.gif">

Ray at work

"Harag" <ha***@softhome.net> wrote in message
news:hi********************************@4ax.com...
Hi all

I'm using W2k Pro, ASP 3, IIS 5 & DWMX 6.1 and code in VBSCRIPT

I currently use the <BASE href=XXXX> in all my pages and just read
that this tag is no longer supported so will soon vanish

I have a couple of sites that I'm working on and to make all my links
work right etc I need to use the base href tag

http://localhost/site1/
http://localhost/site2/
http://localhost/site3/

where online the base href would be

http://www.site1.com/
http://www.site2.com/
http://www.site3.com/

all my links are like <img src=images/mylogo.gif> or <a
src=info/info.asp>Info</a>
Now my problem is how else would I design my sites if I cant use the
Base href tag so the site would work both on LOCAL & REMOTE servers as
needed in the above paths?

I'm sure other people develop on a WIN 2k PRO system where you can
only have ONE site (c:\inetput\wwwrooot\) Which was fine when I only
had one site... but when I needed a second I had to change my first to
use the Base href so I could check the sites out locally (offline)
before uploading them to a live server.

any help would be most appreciated.

thanks

Al

Jul 19 '05 #3
thanks ray.

I think Win 2k server is a bit too much for my budget at the moment,
If all goes to plan then I should be able to get it in 6 months or so.

What about XP PRO? will this host more than one site on my local
machine?

Hopefully the base hrefs will still be available in 6-12 months time
till I can afford the server and time to recode the sites.

The problem I had with relatives were something like using images in
include files which would be included into different asp files at
differnt folder levels below the root. eg a menu include file.

I'm still learning at the moment so I think I'll play around with it a
bit more now I know a little bit more.

thanks again.

Al
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Smith | last post by:
Is there a way to get Javascript to obey the <BASE HREF=""> tag? I have some code that redirects a user to a template on a different domain, but it keeps taking me to the current domain. Code...
7
by: Weston C | last post by:
I'm trying to get the href attribute from the base tag in the document head. The following does not seem to work... any ideas what I'm doing wrong? if(!(document.getElementsByTagName) ||...
6
by: Jeff Thies | last post by:
I have some pages where I need to use a base href tag. Mac behaviour is different than PC. I have this: <base href="http://some_domain.com" /> The page would be:...
1
by: Jeff Thies | last post by:
I have a template driven site, the template is full of images and links. At some point (during a secure order) the user is redirected to a secure server (different domain) using the same...
10
by: Udi Zisser | last post by:
Hello, any idea why this does not work? or how do i get this thing to work? <BASE HREF="http://localhost/thedude/"> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html"> I'm adding...
3
by: Guoqi Zheng | last post by:
Dear sir, On some of my pages, I used a <base href="http://www.meetholland.com/"> I need to dynamically determine the base href value to different URL based on user session. I am thinking...
2
by: Vincent van Beveren | last post by:
Hey everyone, I've looked for this and I wouldn't know what the best practice would be for solving the following problem. We use a BASE tag in our HTML pages. Now we have some links that use...
3
by: yan | last post by:
Hello everybody, I am new so this is the occasion to say hello to everybody. I have a problem with absolute/relative paths. I have to create a static documentation in html for a project and I have...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.