Enable Disable register global from .htaccess

July 11, 2008 · Filed Under Linux / Unix Commands, htaccess · 4 Comments 

At times, we need to set register_globals to on or to off and we cannot modify such directive of php from the php.ini for obvious motives.

Then we can plan register_globals to on or off through an entry in the file .htaccess in the following manner.
For on:

php_flag register_globals on

For off:

php_flag register_globals off