1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Setup For .html/.htm Files Without A Footer File

Discussion in 'Co-op Advertising Network' started by digitalpoint, Dec 1, 2004.

  1. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #61
    Ok tried the above doesnt seem to work, will i have to clear the page tail file as well, btw will this code creat a foot note as well on normal html pages.
    This is how my htaccess file looks like

    RewriteRule ^forums.* /forum/index.php [L,NC]
    RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
    RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
    RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
    RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
    RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
    RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
    RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
    RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
    RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
    RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
    RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
    RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
    RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
    RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
    RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
    RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
    RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]



    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^forum.domainname.nl$
    RewriteRule ^(.*)$ http://www.domainname.nl/forum [R=301,L]

    Im using this htaccess file in the root of the forum, my other html pages are not in the same root, they are closer to the root. Will one htaccess file do and where to place the passthrough file in order to get them both working, they aint in the same folder(root).
    Anyone got any ideas on what to do next much appreciated :p

    In the meantime i have been trying somethings myself, it all works i aint getting an error but the ads dont show up on my html pages.
     
    crazyhorse, Dec 17, 2004 IP
  2. trafficjam

    trafficjam Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #62
    Shawn,

    Your directions are excellent. I've got ads!

    While I am a programmer I don't know php (yet).

    Thanks much.
     
    trafficjam, Dec 20, 2004 IP
  3. Foxy

    Foxy Chief Natural Foodie

    Messages:
    1,614
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #63
    Oh.... there is no doubt about that....the man is right up there :)

    Sometimes however the tweeking of different systems by different people cause problems!

    I suddenly [bit slow these days] realised that I had a rewrite working on one of my sites so I went and tried it there.

    In its form as given above it would not work in the htaccess file but as

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    it would with the escape backslashes [ie no 500 error] except that it gave a T error on the passthru.php

    Any ideas?

    Don't you just love it?...hehehehe
     
    Foxy, Dec 21, 2004 IP
  4. Patient

    Patient Raider

    Messages:
    336
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #64
    Can you provide an example filename.

    I have seen this occur on pages that I made xml compliant and had <?xml version="1.0" encoding="iso-8859-1"?> in them. It didn't like it and gave a T error - I removed it and it then worked.

    PS wasn't using passthru - just processing php in htm.
     
    Patient, Dec 21, 2004 IP
  5. ronredlich

    ronredlich Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #65
    Please help.

    I can't get the ads to work on my site:

    http://www.1st-online-mall.com

    support@phpwebhosting.com reports:

    Yes, mod_rewrite is available. It is installed by default on all servers. Just add your own custom mod_rewrite rules to .htaccess and it will work.
     
    ronredlich, Dec 23, 2004 IP
  6. bloodwrath

    bloodwrath Active Member

    Messages:
    1,364
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    90
    #66
    Hey all had the 500 error as well till...
    is did this, it worked great for the ads

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    but it removed all my title tages & centered some of my pages
    and wiped out my css on some pages

    here is the page
    http://www.supportcave.com/hijackthis.html
    here with .htaccess file
    http://www.supportcave.com/images/mod_changes.PNG

    is this wierd , did this on some pages
    all the ads showed but this is messed
     
    bloodwrath, Dec 25, 2004 IP
  7. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #67
    Is anyone here hosted on "iPowerweb"??????

    I have been unable to get the ad network working and no one has an answer.

    AJ
     
    Spyware Remover, Dec 25, 2004 IP
  8. a3196

    a3196 Well-Known Member

    Messages:
    586
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    108
    #68
    I used to get 500 error,,,

    And i'm a Ipowerweb user...

    It seems like many people are using Ipowerweb...

    It works now by using code below

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    only difference is \ before .htm and .html....

    Great tool anyway...
     
    a3196, Dec 28, 2004 IP
  9. ImVickieB

    ImVickieB Berserker

    Messages:
    158
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #69
    Can anyone help with this issue?

    I currently have the following in my htaccess file in order to allow me to treat html files like shtml and allow virtual includes:

    AddType text/x-server-parsed-html .htm .html

    When I try adding the code above in, it works, but makes the AddType above not work. I NEED that above to work as my site relies heavily on includes.

    Can anyone tell me if is possible to combine the two in order to allow both to work on my site?
     
    ImVickieB, Dec 28, 2004 IP
  10. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #70
    a3196:

    Thanks.

    What code are you using on your html pages to call up the files?

    AJ
     
    Spyware Remover, Dec 29, 2004 IP
  11. a3196

    a3196 Well-Known Member

    Messages:
    586
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    108
    #71
    Hi, AJ

    You don't need to put any code in any of your HTML files,,,

    .htaccess file and passthru.php file will put ad on every html pages before body tag.

    And you can change how they look by changing format on passthru.php

    And I'm using iPowerweb and the code in .htaccess is little bit different

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    This is what I'm using....
    Posted by someone,,,Can't remember...

    I hope you can make it works,,,,
     
    a3196, Dec 29, 2004 IP
  12. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #72
    Thanks!

    So what you are saying is that I DO NOT need to put/make any reference on my pages to passthru.php? because the .htaccess code automatically places the ad code in front of </body>?

    AJ
     
    Spyware Remover, Dec 30, 2004 IP
  13. ImVickieB

    ImVickieB Berserker

    Messages:
    158
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #73

    That's right AJ :)
     
    ImVickieB, Dec 30, 2004 IP
  14. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #74
    GENIUS!!! It works.

    Now......what do I need to edit in passthru.php to change the number of ads shown????

    AJ
     
    Spyware Remover, Dec 30, 2004 IP
  15. a3196

    a3196 Well-Known Member

    Messages:
    586
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    108
    #75
    That's right!!,,,

    Now,, I will see some of your links in my site as well,,,

    Happy new year everone...
     
    a3196, Dec 31, 2004 IP
  16. jema

    jema Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #76
    this is probably not going to add much to the thread. But I got the 500 error as well and made my .htaccess:




    RewriteEngine On

    # Uncomment following line if your webserver's URL
    # is not directly related to physival file paths.
    # Update YourMamboDirectory (just / for root)

    # RewriteBase /YourMamboDirectory

    #
    # Rules
    #

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*) index.php

    <IfModule mod_rewrite.c>
    # RewriteEngine On
    # RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*buy).htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*buy).html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    Which worked for me, partially as I have only a very few .htm files on the site, but I am still at a loss as to what the 500 issue is about :confused:
    trouble with this sort of thing is that with a live site, you don't want to piss about breaking it, when you get it workign you leave it.

    jema
     
    jema, Dec 31, 2004 IP
  17. bloodwrath

    bloodwrath Active Member

    Messages:
    1,364
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    90
    #77
    Hi can anybody help me with this issue

     
    bloodwrath, Dec 31, 2004 IP
  18. GuyFromChicago

    GuyFromChicago Permanent Peon

    Messages:
    6,728
    Likes Received:
    528
    Best Answers:
    0
    Trophy Points:
    0
    #78
    How would the passthru.php need to be changed to center the ad on the .htm or .html page?
     
    GuyFromChicago, Jan 1, 2005 IP
  19. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,199
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #79
    Shawn, is it possible to apply this to .shtml files aswell?
     
    dcristo, Jan 6, 2005 IP
  20. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #80
    Not sure, never tried.
     
    digitalpoint, Jan 6, 2005 IP