Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Exposing ".php~" files |
|
Author |
|
fishgills
Joined: 22 Apr 2008 Posts: 1
|
Posted: Tue 22 Apr '08 22:37 Post subject: Exposing ".php~" files |
|
|
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. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Wed 23 Apr '08 1:59 Post subject: |
|
|
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
|
Posted: Wed 23 Apr '08 9:16 Post subject: |
|
|
I know these files from some editors
a short solution will be
Code: |
<FilesMatch "^\.php~">
Order allow,deny
Deny from all
</FilesMatch>
|
|
|
Back to top |
|
|
|
|
|
|