How to edit .htaccess?

Discussion in 'Co-op Advertising Network' started by teena1jain, Sep 7, 2005.

  1. #1
    Hello everybody,

    I have tried to add the following in my .htaccess file as mentioned in the setup instruction:
    AddType application/x-httpd-php .php .htm .html

    After adding, my site gave 500 internal server error.

    So please tell me how do i edit my .htaccess file?

    Teena
     
    teena1jain, Sep 7, 2005 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Does removing that line fix the error? Was there an existing and needed .htaccess file that you overwrote by accident? Are you using a text editor that creates good clean files?

    Show us the contents.
     
    noppid, Sep 7, 2005 IP
  3. teena1jain

    teena1jain Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, removing the line fixes that error. I had an already existing .htaccess file, which I opened in dreamweaver and added the AddType line. When I saved the changes, the site gave 500 Internal Server Error.

    I then reverted back the changes and site started working perfectly.

    I am not able to put the ad coop ads on my site yet due to this. Please suggest.
     
    teena1jain, Sep 7, 2005 IP
  4. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #4
    Do it via cpanel
     
    fryman, Sep 7, 2005 IP
  5. teena1jain

    teena1jain Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hello,

    I have tried everything. I have tried editing it in cpanel, using FTP, created new, etc. etc.

    After adding the AddType line my site gives Internal Server Error 500. And as I remove this line, the error goes away.

    Please suggest.

    Teena
     
    teena1jain, Sep 11, 2005 IP
  6. ashu

    ashu Banned

    Messages:
    77
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have also same problem. So please tell me how do i edit my .htaccess file?
     
    ashu, Sep 12, 2005 IP
  7. dcristo

    dcristo Illustrious Member

    Messages:
    19,796
    Likes Received:
    1,201
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    5
    #7
    Are you having the problem trying to use the coop on html pages using the passthru method? If so, try this for the .htaccess file:

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