Apache设置:

<Directory "/wp-content/uploads">
    AllowOverride None
    php_flag engine off
    Allow from all
</Directory>

Nginx设置:
location ~ ^/wp-content/uploads/.*\.php$
{
return 404;
}

- EOF -