Look Back

Discussion in 'Apache' started by whirlybird20, Oct 9, 2008.

  1. #1
    Hi,

    This article mentions a "look back" feature, but doesn't say what to put in the .htaccess file. Does anyone know what he means?

    Thanks for your help!
     
    whirlybird20, Oct 9, 2008 IP
  2. whirlybird20

    whirlybird20 Guest

    Messages:
    462
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    whirlybird20, Oct 9, 2008 IP
  3. whirlybird20

    whirlybird20 Guest

    Messages:
    462
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This code should force the file named "article" with no extension to be run as a php file.

    <Files article>
    ForceType application/x-httpd-php
    </Files>
    Code (markup):
    But it doesn't work. It instead tries to download the file to my desktop. Anyone know why this would be happening?
     
    whirlybird20, Oct 10, 2008 IP
  4. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There's another directive that tells PHP to parse files with a .php extension.

    I have these two:
    AddHandler php5-script php
    AddType text/html       php
    Code (markup):
    I have also seen lines more like these:
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    Code (markup):
    I'm not sure if this is what is causing the problem you are having.

    It might help to know what's in the file that gets downloaded to your desktop. Is it PHP source code or an HTML file or is it empty ?
     
    Ladadadada, Oct 14, 2008 IP