在子文件夹中禁用auto_prepend

I'm using auto_prepend in htaccess on my website and I don't want it to be used in subfolder.

For example, in the root folder, the .htaccess have this line

php_value auto_prepend_file "path/to/file.php"

In the admin folder, root/admin, have

RewriteRule . front-controller.php [L]

and here I have some problem because of some class or function loaded twice...

Then how to avoid load auto_prepend in the /admin folder?

To disable auto_prepend in specific folder, just paste this code in the .htaccess file of that specific folder

php_value auto_prepend_file none

For your case, create a .htaccess file under folder root/admin and paste the above code.