$rule = $folder_name.'index.php [L]';
$data = <<<EOF
RewriteEngine On
RewriteBase $folder_name
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . $rule
EOF;
//file_put_contents('.htaccess', $data);