473,594 Members | 2,739 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\www rooot\) 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 4132
Harag wrote on 31 jul 2003 in microsoft.publi c.inetserver.as p.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\www rooot\) 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.Se rverVariables(" HTTP_HOST"),8)= "www.site" Then
basehref="http://"&Request.Serve rVariables("HTT P_HOST")
Else if ..........
' sorry, don't know much about localhost
%>

<base href="<%=basehr ef%>">
--
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.c om...
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\www rooot\) 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
13955
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 sample: <base href="http://www.example.com"> <SELECT onChange="location=this.options.value;"> <OPTION VALUE="shwspool.html">View Spool Directory</OPTION> <OPTION VALUE="monacc.html">View Monitor Access Log</OPTION>
7
9199
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) || !(basehrefs = document.getElementsByTagName('base')) || !(basehrefs.length) || !(basehrefs.length > 0) || !(basehrefs.getAttribute) || !(basehref = basehrefs.getAttribute('href')) )
6
5787
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: some_domain.com/some_directory/some_page.htm
1
1982
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 template. Now, I want the links to point back to the old insecure domain. I could use a base href to do that (links are all / relative, ie: /info.html) but then the images (also root referenced) would be drawn from the insecure domain and there might...
10
7838
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 the <base> tag to the content of an existing html that contains a redirect meta tag.
3
2676
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 to use <base id="baseUrl" runat=server>, it seems not to work. It returns an error of missing </base> but base tag does not need </base>
2
5142
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 the <A HREF="#" onclick="...">Hello</Amethod to invoke a JavaScript. However, because of the BASE tag, when clicking a link containing only a # as 'href' it will load the root index.html file. What I want is it to do nothing and execute the...
3
12841
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 to create an index page in every sub-directory. The structure is like the following: / /sources/ /docs/ /docs/doc1 /share
1
3986
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. Depends on the pull down list selection, I use script.aculo.us to validate the user input before submit and pass the necessary data, such as contact type, contact information and ranking to a php program for updating. This form should allow multiple...
0
8246
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8231
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5404
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3854
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3895
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1476
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1205
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.