Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - subdomain?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

subdomain?

 Post Reply Post Reply
Author
codeguru View Drop Down
Newbie
Newbie


Joined: 23 August 2007
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote codeguru Quote  Post ReplyReply Direct Link To This Post Topic: subdomain?
    Posted: 23 August 2007 at 10:57am
Is there any way to access an include file in the main domain from a subdomain? Please help.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2007 at 8:52pm
it depends on your hosting account.

if the subdomain has access  to the main domain name files then yes, if not then no.

you can try by finding out if you have access add the following to a page on both the sub domain name and main domain name.

<%=Server.MapPath()%>


this with give you your physical location on the server

as an example i will use the following as a file structure

/www/domain.com/
/www/sub.domain.com/

using the above as an example you would use the following code to include a file from "domain.com" in "sub.domain.com", this will be in a page on the root of sub.domain.com

<!--#include file="../domain.com/include.asp"-->


the "../" means go back a folder, so if its in a subfolder on "sub.domain.com" add two, or how ever many you need
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
codeguru View Drop Down
Newbie
Newbie


Joined: 23 August 2007
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote codeguru Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2007 at 11:55am
Thanks for the help
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.