Use PHP to Dynamically Add To .htaccess File Admin 10 years ago $f = fopen(".htaccess", "a+"); fwrite($f, "your content"); fclose($f); 123 $f = fopen(".htaccess", "a+");fwrite($f, "your content");fclose($f);