diff --git a/.htaccess b/.htaccess
index 83f9f9cf2e14008ec64eac0e86d632f9991af027..f15fcb779b0c277ae20cb6e8c2c5f02689331bf3 100644
--- a/.htaccess
+++ b/.htaccess
@@ -4,4 +4,4 @@
 </IfModule>
 
 RewriteEngine on
-RewriteRule ^(.*).less$ less/style.php?name=$1.less
+RewriteRule ^(.*).less$ less/style.php?name=$1.less
\ No newline at end of file
diff --git a/config/config.php b/config/config.php
deleted file mode 100644
index 163f2a6dc5893787db484cbc08505530405b58e1..0000000000000000000000000000000000000000
--- a/config/config.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-const ROOT_DIR="/infoscreen";
-?>
diff --git a/less/style.php b/less/style.php
index ca41f72f179329e51606aa783699536013ac33ac..63e3d4b00728eff6f9366bda21a6adf90fbb10d2 100644
--- a/less/style.php
+++ b/less/style.php
@@ -12,9 +12,17 @@ if (!isset($_GET["name"])) {
 $less_file = $_GET["name"]; //"panels/departure/style.less";
 $debug=isset($_GET["debug"]);
 
-include "config/config.php";
-echo ROOT_DIR;
-
+/*find root dir*/
+$url_arr = explode("/",$_SERVER["PHP_SELF"]);
+$url_arr_size = sizeof($url_arr);
+$ROOT_DIR = "";
+for ($i=1;$i<($url_arr_size-2);$i++)
+{
+    $ROOT_DIR.="/".$url_arr[$i];
+}
+if ($debug)
+    echo $ROOT_DIR;
+/*end finding*/
 
 $panel = null;
 
@@ -73,6 +81,6 @@ if ($debug) {
     else
         echo $content;
 } else {
-    header("Location: ".ROOT_DIR."/$cache_file");
+    header("Location: ".$ROOT_DIR."/$cache_file");
 }