not apache? no need to continue. found this check from the w3 total

cache plugin.
This commit is contained in:
Ben Word
2011-07-31 02:37:22 -06:00
parent 37b8d099e7
commit 5d298fbead

View File

@@ -1,5 +1,6 @@
<?php <?php
if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false) {
function roots_htaccess_writable() { function roots_htaccess_writable() {
if (!is_writable(get_home_path() . '.htaccess')) { if (!is_writable(get_home_path() . '.htaccess')) {
add_action('admin_notices', create_function('', "echo '<div class=\"error\"><p>" . sprintf(__('Please make sure your <a href="%s">.htaccess</a> file is writeable ', 'roots'), admin_url('options-permalink.php')) . "</p></div>';")); add_action('admin_notices', create_function('', "echo '<div class=\"error\"><p>" . sprintf(__('Please make sure your <a href="%s">.htaccess</a> file is writeable ', 'roots'), admin_url('options-permalink.php')) . "</p></div>';"));
@@ -79,5 +80,6 @@ function roots_add_h5bp_htaccess($rules) {
} }
add_action('mod_rewrite_rules', 'roots_add_h5bp_htaccess'); add_action('mod_rewrite_rules', 'roots_add_h5bp_htaccess');
}
?> ?>