Mod Substitute Help

Discussion in 'Apache' started by wrekoniz3, Oct 6, 2009.

  1. #1
    okay i tried replacing some ad code i had in the /etc/httpd/conf/indcludes/pre_main_global.conf


    i have it set so i can put ads on the top and bottom of every page loaded on my server. For some reason when i put the ad code in. its not working. but it works if i put text in the place where the ad code goes.

    The way it is now. The ads dont show up. Here is the code:

    Thanks ahead for any help!
    =================================================

    #LoadModule layout_module /usr/local/apache/modules/mod_layout.so
    AddOutputFilterByType SUBSTITUTE text/html

    #AddOutputFilterByType SUBSTITUTE text/html

    Substitute "s|(<body.*?>)|$1 <center><iframe id='adaa3d8d' name='adaa3d8d' src='http://d1.openx.org/afr.php?zoneid=78332&amp;target=_blank&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='728' height='90'><a href='http://d1.openx.org/ck.php?n=ae63dba7&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://d1.openx.org/avw.php?zoneid=78332&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=ae63dba7' border='0' alt='' /></a></iframe></center>|q"

    Substitute "s|</body>|<center><iframe id='adaa3d8d' name='adaa3d8d' src='http://d1.openx.org/afr.php?zoneid=78332&amp;target=_blank&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='728' height='90'><a href='http://d1.openx.org/ck.php?n=ae63dba7&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://d1.openx.org/avw.php?zoneid=78332&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=ae63dba7' border='0' alt='' /></a></iframe></center>$1|q"

    Substitute "s|<ignorebody>|<body>|i"
    Substitute "s|</ignorebody>|</body>|i"
     
    wrekoniz3, Oct 6, 2009 IP
  2. wrekoniz3

    wrekoniz3 Well-Known Member

    Messages:
    2,232
    Likes Received:
    100
    Best Answers:
    0
    Trophy Points:
    190
    #2
    *update*

    The ad code needed to be escaped. with the \'s put in place. got it working now. Thanks for the help though.
     
    wrekoniz3, Oct 6, 2009 IP