473,406 Members | 2,293 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,406 software developers and data experts.

get host URL

I need to grab the full url of the virtual server server of the image
directory
Jul 22 '05 #1
1 1914
no doubt there are better way to do this , but I have done this in the past

BASE_URL = "http://" & Request.ServerVariables("HTTP_HOST") &
Replace(Request.ServerVariables("URL"),"somefolder/thispage.asp","")

PictureURL = BASE_URL & "pictures"

In the 1st part you replace what you don't want from the current full url to
the page your on
.......based on what ".asp" page/folder you are running at the time.

Then to build your picture folder url you add what folder info you need.

It's going to be slightly different depending on your site layout, where you
are, and the names of your pages and scripts, but this works.

I am sure there is a way better way to do it

--
Christopher Williams

www.PowerASP.com
www.CJWSoft.com
"Fetty" <df********@hotmail.com> wrote in message
news:eP**************@TK2MSFTNGP15.phx.gbl...
I need to grab the full url of the virtual server server of the image
directory

Jul 22 '05 #2

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

Similar topics

1
by: jason mazzotta | last post by:
Hi, I'm rather new to both MySQL and PHP. I've been trying to use PHP to write to a MySQL database. I call mysql_pconnect to get a database connection, but then when I call mysql_db_select, I get...
9
by: Jeff | last post by:
Is there a way to echo back a case sensitive $HTTP_HOST in PHP? For example if I type HostName.domain.com in my browser I want to return it exactly as it appears in the location part of the browser...
1
by: Dave | last post by:
I know that Remoting requires a host application on the server. Is it possible to use COM+ as the host? If so, where can a good example be found?
6
by: Tim | last post by:
I am in the process of moving a site from one hosting company to another. This site is fairly large, with hundreds of asp files, each with multiple "include" statements. The new host has a...
3
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements -...
2
by: Jeff | last post by:
I have an ASP.NET web page accessing a SQL database. I've used VS to build the app and stored it in the eNPTest02 directory of my localhost on my development machine. The database is on the web. ...
6
by: Brian Henry | last post by:
is there a way to get the host name of someone? like mine is 68-23-123-123-pitt-pa.adelphia.net? Request.UserHostName doesn't seem to return the host name like it states in the documentation,...
5
by: zxo102 | last post by:
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a...
7
by: misha | last post by:
Hello. I was wandering if someone could explain to me (or point to some manual) the process of mapping the addresses of host variables by DB2. Especially I would like to know when DB2 decides to...
5
by: Krice | last post by:
There is a component class inside the host class: class Host { Component *c; .... In some cases Component needs to call the host and I guess the only way is that you pass the host for it:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.