.htaccess question

Discussion in 'Co-op Advertising Network' started by michy, Dec 16, 2004.

  1. #1
    I am having trouble setting up the coop ads on my website and I think the issue maybe the .htaccess file. I cannot see the ads on my page and the validation excercise in my coop control panel says the ads cannot be found on my site.

    I set everything up exactly as the instructions say except for the .htaccess file...

    I have regular html pages where I use SSI on the page so I already have this in my .htaccess file

    .htm server-parsed
    .html server-parsed


    The coop instructions say that I need to have this code in the .htaccess file for it to work.

    AddType application/x-httpd-php .php .htm .html

    I do not think I can have both in there and when I tried deleting the server parsed info and using the addtype command, my other SSI calls no longer work on the page and the coop ads still do not work.

    I would appreciate any help.

    Michelle
     
    michy, Dec 16, 2004 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what version of php is the server running? (you can use phpinfo() to find this out)
     
    exam, Dec 16, 2004 IP
  3. expat

    expat Stranger from a far land

    Messages:
    873
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if you use ssi on all your pages the below should work

    <!--#include virtual="/ad_network.php" -->
    M
     
    expat, Dec 16, 2004 IP
  4. michy

    michy Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    The version of PHP that I am running is
    4.3.9

    That information was taken from the Cpanel

    Also that is the exact SSI call that I have in the page, but still no ads are showing.

    Michelle
     
    michy, Dec 16, 2004 IP
  5. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Michelle, what is the URL you have it installed on? Wondering if you can see any of that in the code when you view source..
     
    chachi, Dec 16, 2004 IP
  6. michy

    michy Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #6
    I just checked and the ad_network_ads.txt file is full of links from digital point so obviously something is operating correctly, but still nothing is showing up on my pages.


    Michelle
     
    michy, Dec 16, 2004 IP
  7. michy

    michy Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    find-a-mesothelioma-lawyer.com

    I checked the source code and I do not see the ads.


    Michelle
     
    michy, Dec 16, 2004 IP
  8. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Can you post the exact contents of the .htaccess file are with regards to SSI?
     
    chachi, Dec 16, 2004 IP
  9. michy

    michy Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #9
    .htm server-parsed
    .html server-parsed


    That is all that is in the .htaccess file


    Michellle
     
    michy, Dec 16, 2004 IP
  10. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Try this instead of what you have above:

    AddHandler server-parsed .html .htm
    Options Indexes FollowSymLinks Includes

    You may have to clip that last line if it does not work
     
    chachi, Dec 16, 2004 IP
  11. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #11
    Michy,
    Did you ever get that working?
     
    ResaleBroker, Dec 16, 2004 IP
  12. michy

    michy Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    *SIGH*

    I tried that too :(

    I put the code exactly as you have it and also without the last line and still
    nothing works, I am going to try adding the code to another site and see if the problem is just this particular server.

    Michelle
     
    michy, Dec 16, 2004 IP
  13. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #13
    Try this in your .htaccess file:

    RewriteEngine on
    AddType application/x-httpd-php .php .htm .html
     
    ResaleBroker, Dec 16, 2004 IP
  14. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #14
    well, I don't think that will do it. But, what I would do at this point is run a test to see what is getting included if anything. I would put a couple of test files up on your machine, say: text.txt and text.php Put something like, "text file test" and "php file test" respecitvely in the files.

    Then I would inlcude those files in a test page to see if they are both getting included in the file. If that works, then we can run some php test code in the second one to make sure it is getting parsed as php
     
    chachi, Dec 16, 2004 IP
  15. michy

    michy Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #15
    I tried placing the code on another site and I am having the same problems there, I am not seeing the links. neither am I getting an error message so I assume that means the php script is parsing the info, it is just not showing the links on my pages. I tried Chmod 755 on the .txt, I tried Chmod 777 and 755 on the php page, I even tried recreating the files on my server in case there was a problem during upload ... nothing seems to work. :confused:

    I tried a test as you suggested, I tested by using the same call on a blank html page and also by including another .txt file, nothing shows and no errors.
    The links are being written to the .txt file though.

    All of my current SSI includes are using php includes, so I know that my site parses php ok.

    I really wish I could get this thing working. :(


    Thanks for all your help so far
    Michelle
     
    michy, Dec 16, 2004 IP
  16. michy

    michy Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #16
    I just finished reading a few threads where it says that the code needs to be on all pages. Will the ads start showing before I finish adding the code to all of my pages? Maybe that could be the problem?

    *later*
    I just created a footer.php file and I am including it with an SSI call. I have added the php code directly to that file and that seems to have solved my problem. I now have ads showing!! ;)

    I guess SSI , html and this co-op does not agree.


    Small price to pay but I guess I'll just redo all of my footers to make them php includes and put the co-op code directly in the footer file, instead of using SSI.

    Thanks again for all of the help. :D
    Michelle
     
    michy, Dec 16, 2004 IP
  17. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #17
    glad to hear you got it working. :)
     
    chachi, Dec 16, 2004 IP