How to force required links like the free hosts do?

Discussion in 'Site & Server Administration' started by cgchris99, Jul 10, 2006.

  1. #1
    I want to offer some hosting to a select customer group. In return they will be required to have a link to one of my websites.

    Is there a way to force this? Maybe a required include in the header of their main page?
     
    cgchris99, Jul 10, 2006 IP
  2. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could put their page in a frame and put your link in the other frame.
     
    giraph, Jul 11, 2006 IP
  3. sreyas

    sreyas Well-Known Member

    Messages:
    128
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Hi,

    You could do this with little tweaking in .htaccess Let me put it in different files here

    .htaccess
    
    AddHandler headered .htm
    
    AddHandler headered .html
    
    
    
    Action headered /header/header.php
    
    Code (markup):
    header.php
    
    <?php
    
    
    $header = "header.html";
    
    $file = $_SERVER["PATH_TRANSLATED"];
    
    readfile($header);
    
    readfile($file);
    
    readfile($footer);
    
    
    ?>
    
    Code (markup):
    header.html
    
    <b>Your header.</b>
    
    <hr>
    
    Code (markup):
    This one was used by one of my friend, and shoot any doubts.:)

    Regards
    Ciril
     
    sreyas, Jul 11, 2006 IP
  4. websiteideas

    websiteideas Well-Known Member

    Messages:
    1,406
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    130
    #4
    That looks like a good tip, but where do you place this .htaccess file? Do you have to copy it into every clients home directory?
     
    websiteideas, Jul 15, 2006 IP
  5. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #5
    In IIS (windows servers..), you have the option to add a header via the IIS Administration tool.

    Good explanation for apache, sreyas!
     
    eXe, Jul 17, 2006 IP
  6. sreyas

    sreyas Well-Known Member

    Messages:
    128
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #6
    Yes Jesus Christ I forgot to update about the IIS part. In IIS its much easier. But you need to get direct access to IIS that mean you nead dedicated server.

    If you have access then right click on the ' websites'-> Documents tab in that second section, enable document footer and point the page thats all its done.

    Cheers
     
    sreyas, Jul 17, 2006 IP