diff --git a/.gitignore b/.gitignore
index 48fb421..aa99545 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
vendor/**
-logs/**
+logs/**/*.log
src/settings-local.php
**/bower_components/**
\ No newline at end of file
diff --git a/frontend/.htaccess b/.htaccess
similarity index 89%
rename from frontend/.htaccess
rename to .htaccess
index 070ce66..6fe1d2a 100644
--- a/frontend/.htaccess
+++ b/.htaccess
@@ -4,7 +4,8 @@ RewriteEngine On
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
-RewriteBase /asset-library/frontend
+
+RewriteBase /asset-library
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
diff --git a/data/.htaccess b/data/.htaccess
new file mode 100644
index 0000000..7d3aaf1
--- /dev/null
+++ b/data/.htaccess
@@ -0,0 +1,2 @@
+Order allow,deny
+Deny from all
\ No newline at end of file
diff --git a/frontend/index.php b/frontend/index.php
deleted file mode 100644
index 8efdb73..0000000
--- a/frontend/index.php
+++ /dev/null
@@ -1,3 +0,0 @@
-withHeader('Location', dirname($request->getUri()->getBasePath()) . '/frontend/' . $result['url']);
+ $response = $response->withHeader('Location', $request->getUri()->getBasePath() . '/' . $result['url']);
} else {
$template_names = [
//'/configure' => 'configure',
@@ -77,8 +77,8 @@ if(isset($frontend) && $frontend) {
$errorResponse = new \Slim\Http\Response();
$params = [
'data' => $result,
- 'basepath' => dirname($request->getUri()->getBasePath()) . '/frontend',
- 'bowerpath' => dirname($request->getUri()->getBasePath()) . '/bower_components',
+ 'basepath' => $request->getUri()->getBasePath(). '',
+ 'bowerpath' => $request->getUri()->getBasePath() . '/bower_components',
'path' => $path,
'params' => $request->getQueryParams(),
'categories' => [], // Filled later
diff --git a/src/routes/auth.php b/src/routes/auth.php
index 178292d..4262af5 100644
--- a/src/routes/auth.php
+++ b/src/routes/auth.php
@@ -3,7 +3,7 @@
// Initializes the connection by sending all categories available
-$app->get('/configure', function ($request, $response, $args) {
+$app->get('/configure', function ($request, $response, $args) { global $frontend;
$params = $request->getQueryParams();
$category_type = $this->constants['category_type']['addon'];
@@ -28,7 +28,9 @@ $app->get('/configure', function ($request, $response, $args) {
return $response->withJson([
'categories' => $query->fetchAll(),
'token' => $token,
- 'login_url' => $_SERVER['HTTP_HOST'] . dirname($request->getUri()->getBasePath()) . 'frontend/login#' . urlencode($token),
+ 'login_url' => $_SERVER['HTTP_HOST'] .
+ (isset($frontend) && $frontend ? dirname($request->getUri()->getBasePath()) : $request->getUri()->getBasePath()) .
+ '/login#' . urlencode($token),
// ^ TODO: Make those routes actually work
], 200);
diff --git a/templates/.htaccess b/templates/.htaccess
new file mode 100644
index 0000000..7d3aaf1
--- /dev/null
+++ b/templates/.htaccess
@@ -0,0 +1,2 @@
+Order allow,deny
+Deny from all
\ No newline at end of file
diff --git a/templates/_header.phtml b/templates/_header.phtml
index 329821e..3651689 100644
--- a/templates/_header.phtml
+++ b/templates/_header.phtml
@@ -31,7 +31,7 @@
- Godot Asset Library
+ Godot Asset Library