在开发过程中,我上传了index.php.bak并试图从浏览器中访问index.php,它正在从服务器下载完整的PHP文件。我立即删除了index.php.bak,但仍然从服务器下载文件。Dam还在被下载。删除的文件和再次上传的文件,但它仍然被下载。我又把它删除了,还被下载。ubuntu@domU:/var/www$ ls -la index.php
ls: cannot access index.php: No such file
failed to open stream: No such file or directory in /home/ross/public_html/000-wordpress/public/app/index.php:/usr/share/php:/usr/share/pear') in /home/ross/public_html/000-wordpress/public/a
我在.htaccess中使用了这段代码来强制下载所有文件--Header set Content-Disposition attachment但是,我如何才能授予index.php一个例外,因为它不能下载。我知道可以使用FilesMatch,但我需要下载除index.php之外的所有文件。我无法列出FilesMatch中的所有文件扩展名。提前感谢!