custom php.ini and rewriterule in .htaccess

1.6k Views Asked by At

I have a php application, which requires an .htaccess file with this rewriterule in it:

RewriteRule .* blog_manager/controller/frontController.php

I've opened a new hosting account and I wanted them to disable the extension: suhosin.mt_srand.ignore

for that they added the following lines to the .htaccess file, which are supposed to load a custom .ini file that disables that extension:

AddHandler phpini-cgi .php
Action phpini-cgi /cgi-bin/php5-custom-ini.cgi

but then, I started getting 500 Internal server error... apparently, the rewriterule and the lines they added don't work together.

I've tried to disable that extension with ini_set() in the code and with php_flag/php_value in the htaccess file, but both failed.

does anybody know why is that? Is there anything that can be done to allow the rewriterule and still disable that extension?

1

There are 1 best solutions below

9
On BEST ANSWER

Change your rule to this:

RewriteCond %{REQUEST_URI} !/blog_manager/controller/frontController.php [NC]
RewriteRule ^ blog_manager/controller/frontController.php [L]