Are you looking for a solution to turn off the magic quotes using .htaccess ? If you work on local than you can turn off magic quotes in php.ini file but when you works with server, you may not have access of server’s php.ini file. There is another way to do the same task. You can turn off the magic quotes using .htaccess. Here is the code you need to put in .htaccess at very top of the page.
php_flag magic_quotes_gpc Off