Base Href problems

H

Harag

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
 
R

Ray at

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
 
E

Evertjan.

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%>">
 
H

Harag

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top