1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Fixes #937 - detect of mod-rewrite is possible. New constant: e_MOD_REWRITE

This commit is contained in:
Cameron
2015-03-31 07:25:39 -07:00
parent b8d2f6667c
commit afb8d290e5
3 changed files with 21 additions and 4 deletions

View File

@@ -63,6 +63,14 @@ class eurl_admin_ui extends e_admin_controller_ui
public function init()
{
$htaccess = file_get_contents(e_BASE.".htaccess");
if(strpos($htaccess, 'SetEnv HTTP_MOD_REWRITE On')===false)
{
e107::getMessage()->addWarning("Mod-rewrite is disabled. Please add the following to your <b>.htaccess</b> file after the line \"Rewrite Engine On\":<br /><pre>SetEnv HTTP_MOD_REWRITE On</pre>");
}
if(is_array($_POST['rebuild']))
{
@@ -151,12 +159,18 @@ class eurl_admin_ui extends e_admin_controller_ui
public function simplePage()
{
// $this->addTitle("Simple Redirects");
$eUrl =e107::getAddonConfig('e_url');
$eUrl =e107::getAddonConfig('e_url');
if(empty($eUrl))
{
return;
}
$text = "";