logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Exposing ".php~" files
Author
fishgills



Joined: 22 Apr 2008
Posts: 1

PostPosted: Tue 22 Apr '08 22:37    Post subject: Exposing ".php~" files Reply with quote

Is there a way to have apache not output my php files if a tilda is appended to the file extension?

I find that if I go to http://www.example.com/index.php~, apache spits out the source of the php file. This is not good. Smile
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Wed 23 Apr '08 1:59    Post subject: Reply with quote

I don't see that with Apache 2.2.8 / PHP 5.2.2 on Windows using either php5apache2_2.dll or mod_fcgid.

What are you running and how is PHP configured in your httpd.conf file?

-tom-

p.s. Please remember to post just the PHP section of your configuration file, not the whole file - per the Forum Rules.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 23 Apr '08 9:16    Post subject: Reply with quote

I know these files from some editors Wink

a short solution will be

Code:

<FilesMatch "^\.php~">
    Order allow,deny
    Deny from all
</FilesMatch>
Back to top


Reply to topic   Topic: Exposing ".php~" files View previous topic :: View next topic
Post new topic   Forum Index -> Apache