diff --git a/htaccess b/MTS/Source/htaccess similarity index 64% rename from htaccess rename to MTS/Source/htaccess index de0fb46..a734911 100644 --- a/htaccess +++ b/MTS/Source/htaccess @@ -2,4 +2,4 @@ Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.*[^/])/?$ /~sean/mts/index.php?source=$1 [QSA,L] \ No newline at end of file +RewriteRule ^(.*[^/])/?$ /index.php?source=$1 [QSA,L] \ No newline at end of file diff --git a/config.php b/config.php index e72f899..ed79f96 100755 --- a/config.php +++ b/config.php @@ -31,7 +31,8 @@ //////////////////////////////////////////////////////////////////////////////// */ - $userspath = "MTS/Source/users.php"; + $userspath = "MTS/Source/users.php"; + $htaccesspath = "MTS/Source/htaccess"; if (file_exists($userspath)) { ?>
The users file already exists \"$adminpass\",\n"; $userstext .= ");\n"; @@ -58,8 +59,16 @@ { echo "
MTS was unable to create users.php, the file that stores login information.
"; exit(); - } + }*/ + + // 2 // Generate .htaccess + $rooturl = preg_replace(':/[^/]*$:i','/',$_SERVER['REQUEST_URI']); + $htaccess = file_get_contents($htaccesspath); + $htaccess = preg_replace(':/index:i', $rooturl.'index', $htaccess); + if (!file_put_contents('.htaccess', $htaccess)) + echo "MTS was unable to create your .htaccess file $htaccess foo
"; + // 4 // Redirect echo "User Created