Disabling Magic Quotes GPC

How to turn off magic quotes gpc (required by Joomla 3 and some other scripts).

1. Create a php.ini file in your script's root directory with the following:

magic_quotes_gpc = Off

2. Create/Edit .htaccess file in your script's root directory and add the following lines at the top:

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/YourUsername/public_html
 <Files php.ini>
  order allow,deny
  deny from all

Was this answer helpful?

Also Read

.htaccess rules to Harden your website’s Security

Below you see a list of the important rules that you can add to your .htaccess file to harden...

GET/POST Security with .htaccess

Below is a useful code to block out some common exploits for GET/POST values with .htaccessSimply...

.htaccess 301 Redirect Generator

A simple .htaccess 301 redirect generator to be used to create SEO friendly permanent redirects....

.htaccess RewriteRule Examples

Here are some useful mod_rewrite RewriteRule redirect examples that you can use in your .htaccess...

Redirect non-www to www over http and https

Use the following .htaccess code to redirect non-www URLs to www over http and https. Create, or...