.htaccess - wordpress plugin development to add in htaccess file -


i'm developing plugin in wordpress needs add htaccess code used insert_with_markers it's writing htaccess adds on bottom of htaccess file need add code on top of htaccess file. how do this?

you have prepend htaccess rules want add exisiting rules. the:

function my_htaccess_contents( $rules ) {     $my_content = <<<eod     \n # begin added content     # protect wpconfig.php     <files wp-config.php>       order allow,deny       deny      </files> # end added content\n eod; return $my_content . $rules; } add_filter('mod_rewrite_rules', 'my_htaccess_contents'); 

Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -