Add config options for clean URLs and H5BP's .htaccess
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
define('ROOT_RELATIVE_URLS', true);
|
||||
define('ROOT_RELATIVE_URLS', true); // Use root relative URLs
|
||||
define('REWRITE_URLS', true); // Use rewrites for theme assets and plugin folders
|
||||
define('H5BP_HTACCESS', true); // Include the HTML5 Boilerplate .htaccess
|
||||
define('POST_EXCERPT_LENGTH', 40);
|
||||
define('BOOTSTRAP_RESPONSIVE', true);
|
||||
define('WRAP_CLASSES', 'container');
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// https://github.com/retlehs/roots/wiki/Nginx
|
||||
// https://github.com/retlehs/roots/wiki/Lighttpd
|
||||
|
||||
if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') || stristr($_SERVER['SERVER_SOFTWARE'], 'litespeed') !== false) {
|
||||
if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') || stristr($_SERVER['SERVER_SOFTWARE'], 'litespeed') !== false) {
|
||||
|
||||
function roots_htaccess_writable() {
|
||||
if (!is_writable(get_home_path() . '.htaccess')) {
|
||||
@@ -44,9 +44,15 @@ if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') || stristr($_SERVER['SERVER_S
|
||||
|
||||
// only use clean urls if the theme isn't a child or an MU (Network) install
|
||||
if (!is_multisite() && !is_child_theme() && get_option('permalink_structure')) {
|
||||
add_action('generate_rewrite_rules', 'roots_add_rewrites');
|
||||
add_action('generate_rewrite_rules', 'roots_add_h5bp_htaccess');
|
||||
if (!is_admin()) {
|
||||
if (REWRITE_URLS) {
|
||||
add_action('generate_rewrite_rules', 'roots_add_rewrites');
|
||||
}
|
||||
|
||||
if (H5BP_HTACCESS) {
|
||||
add_action('generate_rewrite_rules', 'roots_add_h5bp_htaccess');
|
||||
}
|
||||
|
||||
if (!is_admin() && REWRITE_URLS) {
|
||||
$tags = array(
|
||||
'plugins_url',
|
||||
'bloginfo',
|
||||
|
||||
Reference in New Issue
Block a user