Results 1 to 2 of 2

Thread: interaction amongst subdomains

  1. #1
    Join Date
    Aug 2005

    interaction amongst subdomains

    We have created a small portal where there are interactions amongst the subdomains, the folder structure is like below:

    -- news (news.website.com)
    -- games (games.website.com)
    -- my (my.website.com)
    -- www (www.website.com)
    -- cms (cms.website.com)
    -- asset (asset.website.com)
    -- library

    now the websites are only www (the main site), news, games, cms, and my.
    asset is where we keep all the images, files, and scripts.
    library is where we keep the php config files and the functions.

    Now for example in the cms.website.com we would like to delete a game the game files and thumbnails are all inside: asset.website.com/game/42 (42 being the ID of the game).

    Normally what I do is call a function which I have created before:
    deleteFolder("folder location") which just unlinks the files and then deletes. This always worked when there was just one website all we had to do was:
    deleteFolder("../../asset/game/42") and it would be deleted.

    In this case ../../ does not go anywhere outside the cms.website.com therefore it wont delete.

    On the other hand deleteFolder("asset.website.com/game/42") does not work either.

    What can I do?

    Also another example is login; basically all actions that are general amongst all subdomains we execute them in the my.website.com/actions folder. Therefore if I am in news.website.com and want to login it should be something like this:
    PHP Code:
    <form action="http://my.website.com/actions/login.php" method="post"
    where action happens then it redirects back to the URL where the user was on.
    but of course this does not work. placing ../../my/actions/login.php also does not work.

    Please help me out here.

    Must I ask the Hosting company to do something to allow interactions amongst subdomains? Or is there a way I can write this to allow it to work?


  2. #2
    Join Date
    Aug 2005
    Well I was able to find a solution for this:
    basically I created a shortcut of the folder with all the actions to the other directories and renamed it global_actions ... works perfectly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center