private static function rewrite($settings) { if (mod_rewrite() or is_apache() and $settings['metadata']['rewrite']) { $htaccess = Braces::compile(APP . 'storage/htaccess.distro', array('base' => $settings['metadata']['site_path'], 'index' => is_cgi() ? 'index.php?/$1' : 'index.php/$1')); if (isset($htaccess) and is_writable($filepath = PATH . '.htaccess')) { file_put_contents($filepath, $htaccess); } else { Session::put('htaccess', $htaccess); } } }
<input name="theme" type="hidden" value="<?php echo $theme; ?> "> <?php } ?> <div class="form-group"> <div class="row"> <label class="col-xs-4 control-label" style="padding-top:4px">Clean URL's</label> <div class="col-xs-8"> <?php if (mod_rewrite()) { ?> <p>Looks like you are running apache with <code>mod_rewrite</code> enabled.<br> The installer will create the .htaccess for you.</p> <?php } elseif (is_apache()) { ?> <p>Looks like you are running apache, but <code>mod_rewrite</code> is not enabled.</p> <p><input id="rewrite" name="rewrite" type="checkbox" value="1"> Create the .htaccess file for me anyway.</p> <?php