• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Disable php in a specific directory

HubertP

New Pleskian
Hello,

I want to disable php for specific directory of my website.

For example the "media" directory.

I tried this in a htaccess file :
Code:
<Directory /var/www/vhosts/mydomaine.tls/httpdocs/medias/upload>
       RemoveHandler .php .phtml .php3
       RemoveType .php .phtml .php3
       php_flag engine off
</Directory>
but it doesn't work.

PHP support (Run PHP as Apache Module , PHP version 5.4.4 )

I tried in "Web Server Settings for > Additional directives for HTTP" but doesn't work :'(

Thank's for your help :)

Pierre-Louis Hubert
 
Back
Top