Hy dido
why not a function like this to modify .htaccess![]()
Code:function update_htaccess($new_content_htaccess){ global $path_to_htaccess; $modifying_file=$path_to_htaccess.".htaccess"; $fp=fopen($modifying_file,"r"); $content=fread($fp,filesize($modifying_file)); fclose($fp); if (eregi("content indexu",$content)) { $new_content=preg_replace("/#content indexu do not touch(.*)#End content indexu/s", "#content indexu do not touch\n".$new_content_htaccess."/n#End content indexu",$content); $fp=fopen($modifying_file,"w"); fwrite($fp,$new_content); fclose($fp); } else { $new_content="#content indexu do not touch\n".$new_content_htaccess."/n#End content indexu"; $fp=fopen($modifying_file,"a"); fwrite($fp,$new_content); fclose($fp); } return true; }


