Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts

    URL redirection or... umm..

    I never get involved with this side

    The client has their own domain, and hosting. Lets call it www.client.net

    They want a microsite: www.client.net/microsite

    They want that microsite to be hosted by us. They want www.client.net/microsite to appear in the address bar, and none of us want frames.

    We're on IIS servers. I dunno what they're on right now, but I reckon it'll be Apache/Linux.

    I'm suffering a mental block here. This is easy, isn't it?

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Oh dear. 24 views, no replies.

    Is this hard, then? Can't they just set a virtual dir up on their server that goes to our IP address? Or... anything?


  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What's the actual question here?

    So you upload your site to www.client.com/microsite ... problem solved?

  • #4
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Quote Originally Posted by Spudhead
    They want that microsite to be hosted by us.
    Or, more accurately, WE don't want to build a microsite away from all the custom-built ASP tracking and reporting functionality that's running on our server. If we have to get them to host it, then so be it. But I was fairly sure it was easy to redirect. Maybe I had my wires crossed.

  • #5
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok I think you need a sub domain so it wuld look like this
    microsite.client.com/ if thay make the sub domain thay can then go and redirect it to an IP that you set up I am not 100% sure on the proses involved with this but I do know that it can be done.

  • #6
    New Coder
    Join Date
    Dec 2005
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe you could do it with a .htaccess file?

  • #7
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    <iframe> ? then in the iframe target it to http://yoursite.com/thiermicrosite
    also use javascript to keep the page in the iframe, i seen a good javascript on www.runescape.com for this ...
    Code:
     try { if (self==top) { top.location.href="http://www.theresite.com/thiermicrositewithiframe.htm"; } } catch(er) { }

  • #8
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Hmmmm.

    Looks like this isn't going to be pretty, then.

    If I use any sort of URL redirection: htaccess or the suchlike, it'll replace the address in the browser. The client does not want this.

    The microsite MUST appear at www.client.com/microsite: www.clientmicrosite.com or microsite.client.com or even client.microsite.com - these are not options.

    I'm going to have to stick this thing in a frame, aren't I? EEwwwwwww.

  • #9
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can put a server side scripting page (PHP, ASP, JSP, ...) on their server, that will grab the content from your server and outputs it.

    setting this up can be realy simple or extremely complex, depending on what actually goes on in the scripts on your site, and if you're doing a lott of formprocessing, using cookies etc.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #10
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by raf View Post
    you can put a server side scripting page (PHP, ASP, JSP, ...) on their server, that will grab the content from your server and outputs it.

    setting this up can be realy simple or extremely complex, depending on what actually goes on in the scripts on your site, and if you're doing a lott of formprocessing, using cookies etc.
    Yes, Spudhead, if your client's is php-apache, then you can apply php curl() method in your client webpage www.client.net/microsite/index.php to read all contents from your IP or site.

    For example,

    PHP Code:

    <?php

    $curl_handle
    =curl_init();
    curl_setopt($curl_handle,CURLOPT_URL,'http://www.codingforums.com');
    curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
    curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
    $buffer curl_exec($curl_handle);
    curl_close($curl_handle);

    if (!empty(
    $buffer))
    {
        print 
    $buffer;
    }
    ?>
    Otherwise, I think you'd better use framing like other URL redirecting services (like http://uni.cc and my e.g. is http://fbtb.uni.cc/ -- check the source code of frameset) do. Also read apache's manual for multiple cross servers.
    Last edited by iota; 10-05-2006 at 06:01 PM.

  • #11
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    A subdomain is gonna be your best bet I think, I believe you can make it resolve to your IP address. If they are running IIS, they could make a virtual directory but it would still be hosted on the same server, the files could just be a different location.
    OracleGuy


  •  

    Posting Permissions

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