custom header across multiple domains on same ip with htaccess?

Discussion in 'Programming' started by opioq, Mar 28, 2007.

  1. #1
    I have a network of domains and sites run by a few different people. I would like to brand the sites to the network by creating a custom header/footer without having to touch any of the code on anyone's files similar to what CafePress and Bolger has done but across multiple domains. Since all the sites are on the same IP maybe .htaccess can do this for me but I do not know where to start.
     
    opioq, Mar 28, 2007 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    What sort of server access do you have ?
     
    krakjoe, Mar 29, 2007 IP
  3. opioq

    opioq Banned

    Messages:
    248
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    opioq, Mar 29, 2007 IP
  4. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #4
    hello
    no need htaccess to make this here is a simple example
    create a file choosename.js
    put your content in file
    example :
    document.write('<div style="color:#000000; border:#FF0000 solid 1px;font-family:Arial, Helvetica, sans-serif; font-size:24px">Demo</div>');
    Code (markup):
    now use the code bellow to display the content in others domains
    <script language="javascript" src="http://www.masterdomain.com/1.js"></script>
    Code (markup):
     
    Estevan, Mar 29, 2007 IP
  5. opioq

    opioq Banned

    Messages:
    248
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I do not really understand. Is there a way I can place one file in the root which contains all the folders of sites with domains which would call the header and footer across all html and php pages.

    I do not want to physically edit any of the code on any of the sites, there are quite a few and more added all the time.
     
    opioq, Mar 31, 2007 IP
  6. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #6
    ok
    mod_layout make all job for you => tangent.org download
    usage
    There are three types of headers and footers. You can either add a simple piece of text:
    LayoutHeader "Sample header"
    LayoutFooter "Sample Footer"


    or you can insert entire files by using:
    LayoutHeader /usr/local/apache/htdocs/header.html
    LayoutFooter /usr/local/apache/htdocs/footer.html

    or by URI:
    LayoutHeader /header.pl
    LayoutFooter /footer.php
     
    Estevan, Apr 1, 2007 IP