Change PHP variables using .htaccess

If you need to change the way your PHP is working you can do that using .htaccess.
Please, note that not all PHP options can be changed using .htaccess.
A list of options that can be changed using .htaccess file can be found at:

As we utilize suexec and phpsuecec - the use of the flag and the and infact all php items can be relocated to a php.ini file. 

The syntax is pretty simple:

var [value]

For example if you need to turn deny access:

deny all

If you need to point to your php.ini file location:

SetEnv PHPRC /home/youraccountname/public_html

  • 163 Users Found This Useful
Was this answer helpful?

Related Articles

Can you provide a custom package for me?

Yes, most definitely. Simply open up a helpdesk ticket in the Sales department or contact us...

Redirect URLs using .htaccess

Sometimes you need to redirect some URL and/or page on your site to another one.The feature is...

Force SSL/https using .htaccess and mod_rewrite

Sometimes you may need to make sure that the user is browsing your site over a secure...

Block Bad robots, spiders, crawlers and harvesters

There are lots of examples across the internet that use ModRewrite. We will provide such an...

Force www vs non-www to avoid duplicate content on Google

Recently, it has been talked a lot about Google and duplicate content as well as Google Canonical...