hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting : asp includes across domains
Reply

Forum Jump

asp includes across domains

Reply Post New Thread In Web Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-24-2007, 06:30 PM
brian2000 brian2000 is offline
Newbie
 
Join Date: Oct 2005
Posts: 28

asp includes across domains


I have a windows 2003 "web edition" dedicated server leased from fasthosts.
I would like to store some asp includes in a specific location on the server that can be called by different domains.
Is this possible?
Thanks.
Brian

Reply With Quote


Sponsored Links
  #2  
Old 03-25-2007, 05:53 AM
joltdigital joltdigital is offline
Junior Guru Wannabe
 
Join Date: Oct 2004
Posts: 81
You can create a virtual directory in each sites config pointing to the directory with the code in question. You just need to make sure the anon web user for the domain has read and exec perm on the virtual directory's physical location.

__________________
JoltDigital Inc.

Reply With Quote
  #3  
Old 03-25-2007, 11:18 AM
brian2000 brian2000 is offline
Newbie
 
Join Date: Oct 2005
Posts: 28
Thanks for this................can you expand a bit.........
I'm unsure how to create a virtual directory in the relavant sites pointing to the code.

(say) I have the include file called "include_hallo.asp" located on the server at d:\home\Brian\htdocs\acme.com\global_includes\include_hallo.asp

and I want to call it to

d:\Brian\htdocs\websitexyz.com\default.asp

how should I do that...............



Also, if I'm on the right track, and from a security point of view, should I locate the directory that holds the include files higher up the folder tree than "Brian\htdocs".............


Last edited by brian2000; 03-25-2007 at 11:26 AM.
Reply With Quote
Sponsored Links
  #4  
Old 03-25-2007, 11:45 AM
brian2000 brian2000 is offline
Newbie
 
Join Date: Oct 2005
Posts: 28
Oops,........I made a mistake typing the folder trees in the last post. Unfortunately I can't correct it because I'm out of the 15 minute time limit allowed to change things, so here is the "correct" message:

Thanks for this................can you expand a bit.........
I'm unsure how to create a virtual directory in the relavant sites pointing to the code.

(say) I have the include file called "include_hallo.asp" located on the server at d:\home\Brian\acme.com\htdocs\global_includes\include_hallo.asp

and I want to call it to

d:\Brian\websitexyz.com\htdocs\default.asp

how should I do that...............



Also, if I'm on the right track, and from a security point of view, should I locate the directory that holds the include files: ("global_includes") higher up the folder tree than "Brian\acme.com\htdocs\

Reply With Quote
  #5  
Old 05-08-2007, 04:48 PM
kang kang is offline
Newbie
 
Join Date: May 2007
Posts: 6
Not sure if I understand what you are trying to do. You can create an includes folder like \Brian\Includes and put all include asp pages in there and you can create a virtual directory called global_includes in the root of your web site and you can reference all your include asp page and you can reference all includes asp pages ..\global_includes\whatever.asp on your web pages.

Reply With Quote
  #6  
Old 05-13-2007, 03:20 AM
brian2000 brian2000 is offline
Newbie
 
Join Date: Oct 2005
Posts: 28
Thanks kang.
Perhaps I should explain............

At the moment I have a "copyright" include file for each individual domain/website.
I have 40 domains/websites.
Every year I have to update each one with the new year.

what I want to do is have one include file located somewhere (anywhere)on my server and every domain will call that include.

This way I'll only have to update 1 file every year instead of 40 or so.

Reply With Quote
  #7  
Old 05-15-2007, 04:38 AM
plumsauce plumsauce is offline
******* Unleaded
 
Join Date: Feb 2004
Posts: 3,825
You don't have to update every year. Just use the asp date object and extract the year.

__________________
edgedirector.com
managed dns global failover and load balance (gslb)
exactstate.com
uptime report for webhostingtalk.com

Reply With Quote
  #8  
Old 05-15-2007, 08:18 AM
kang kang is offline
Newbie
 
Join Date: May 2007
Posts: 6
Well, you can create a virtual directory on those 40 servers and you can point that virutal directory as a UNC path to that central server. so you can create a generic account that only has read share and read folder access to that server and use that credential in the virtual directory.
However, this is not a good practice. If that one central server goes down, then all your other 40 servers can go down as well. You can actually write a script or automate to deploy files to those 40 servers as this is probably a better, more reliable way to do things.

Reply With Quote
  #9  
Old 05-15-2007, 12:39 PM
brian2000 brian2000 is offline
Newbie
 
Join Date: Oct 2005
Posts: 28
I'm obviously not explaining properly. Sorry folks.
plumsauce: Thanks for this but I am not looking for a solution to dates etc. I was using this as an example of a reason for needing to call 'asp includes' from differnet domains.

Kang: thank you for your interest but I don't have 40 servers. I have 1 server with 40 domains.... (fred.com / joe.com / brian.com / george.com / etc.)
All domains (clients websites) are hosted on the same server and I want to have an include (let's call it copyrightdate.asp) that is located in one domain and that any other domain on the server can call.
Let's say the include is here: MyServer/htdocs/joe.com/includes/copyrightdate.asp)

I want the domain george.com to be able to call it as an include.


To clarify my question, both domains are on the same server but I can't call a file across the domains.

In other words, I can call the file with no problem in the normal way thus:
copyrightdate.asp is placed it under a folder called "includes" inside the domain www.joe.com:
In www.joe.com/default.asp I put the code <!--#include file="includes/copyrightdate.asp" -->
Everything is OK

Next, I am in www.george.com/default.asp and want to call the same include from www.joe.com/includes/copyrightdate.asp

I have tried numerous ways using relative paths and absolute paths but I can't seem to get the server to allow me to do it.

Do I have to change a server permission or something like that?

Thanks again folks for all the help.
Brian.

Reply With Quote
  #10  
Old 05-15-2007, 04:55 PM
kang kang is offline
Newbie
 
Join Date: May 2007
Posts: 6
This comes back to making a virtual directory. You'll need to create a virtual directory called "includes" in the root of www.george.com web site. And that "includes" path should point to the exact path where that asp file is kept.
Or you can move the includes folder for example, to D:\inetpub\includes and create a virtual directory called "includes" in the root of all your 40 web sites and point it to that exact path.

I think this link will give you a little idea on what virtual directory does:
http://support.microsoft.com/kb/172138/en-us

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Hosting Sales and Promos - June 13, 2014 Web Hosting News 2014-06-13 18:30:39
Nominet Plans to Make Shorter .UK Domains Available Starting June 10 Web Hosting News 2014-02-03 12:08:10
Web Hosting Sales and Promos Roundup - January 10, 2014 Web Hosting News 2014-05-23 15:42:33
Web Hosting Sales and Promos Roundup - November 8, 2013 Web Hosting News 2014-05-23 15:42:41
Web Hosting Sales and Promos Roundup – February 15, 2013 Web Hosting News 2014-05-23 15:43:18


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?