summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/config.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/config.php b/inc/config.php
index 4fe7a988..c60ecace 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -149,7 +149,7 @@
// The root directory, including the trailing slash, for Tinyboard.
// examples: '/', 'http://boards.chan.org/', '/chan/'
- $config['root'] = '/';
+ $config['root'] = ($_SERVER['REQUEST_URI'] == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/');
$config['dir']['img'] = 'src/';
$config['dir']['thumb'] = 'thumb/';