Вопрос

I have a LAMP server running php as suphp, with several websites. If I'm not mistaken, php code can normally be prevented from running in a certain part of a website by putting "php_flag engine off" in a .htaccess file located in the corresponding directory, alternatively put "php_flag engine off" in the VirtualHost directive in Apache. But this apparantly is only valid for regular mod_php and not suphp. So how can I achieve the same thing in suphp?

For example, I want to disable PHP code inside the www.foo.com/images/ but allow it anywhere else on that site.

I have searched here on stackoverflow but only found solutions for mod_php.

Это было полезно?

Решение

Add the following into .htaccess

RemoveHandler .php
RemoveType .php

in the folder which you need to disable PHP for

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top