How to add something to more than 3,000 html pages automatically

Discussion in 'Programming' started by sp360, Mar 30, 2008.

  1. #1
    I want to know if there is a code or a script that i can use on my server to add a code toe every html page on my site. I need to add a ad code but there are more than 3,000+ html pages. Is there a .htaccess code or something that automatically includes a diffrent page in it or insert a specified code in it.
    Thanks SP360
     
    sp360, Mar 30, 2008 IP
  2. Farhan5

    Farhan5 Peon

    Messages:
    189
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    in my ways..there is no code...
    but software can do this..
     
    Farhan5, Mar 31, 2008 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not if it hasnt been setup to do it in the first place but many web design applications have a "find and replace" in complete site option. If your webserver supports sHTML through the .html file extension or PHP/ ASP/ .Net etc with file extension remapping then you can add a file include to all the pages using find and replace leaving you a simpler way of updating the include in the future and not having to upload 3000+ pages.
     
    AstarothSolutions, Mar 31, 2008 IP
  4. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There is a .htaccess way, I just do not know what it is off the top of my head.

    EDIT: Lines like these, I believe..

    php_value prepend_file "foo.php"

    php_value append_file "foo.php"


    Append/prepend depending on if you want the code added to the bottom/top. I think you can also put 'auto_' in front of the append/prepend.. I've never used this stuff but I know I've read it places.
     
    zerxer, Mar 31, 2008 IP