mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-23 03:12:14 +00:00
Moved index & htaccess to public folder
This commit is contained in:
parent
51a299bf62
commit
ae535719f2
@ -3,18 +3,15 @@
|
|||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f [OR]
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} -f
|
|
||||||
|
|
||||||
RewriteRule ^(.*)$ src/index.php [L]
|
RewriteRule ^(.*)$ index.php [L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
ErrorDocument 403 /index.php
|
||||||
# RedirectMatch 403 ^/vendor/*$
|
|
||||||
ErrorDocument 403 /src/index.php
|
|
||||||
|
|
||||||
|
|
||||||
<FilesMatch ".*\.(php|html|twig|json)$">
|
<FilesMatch ".*\.(php)$">
|
||||||
<IfVersion < 2.4>
|
<IfVersion < 2.4>
|
||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Deny from all
|
Deny from all
|
@ -16,6 +16,11 @@ $ap = AdminPanel::getInstance();
|
|||||||
2: match routes directly with modules
|
2: match routes directly with modules
|
||||||
*/
|
*/
|
||||||
$cache = $ap->getCache();
|
$cache = $ap->getCache();
|
||||||
|
|
||||||
|
if (!$ap->isCacheEnabled()) {
|
||||||
|
$cache->clear();
|
||||||
|
}
|
||||||
|
|
||||||
$caches = $cache->getMultiple(array(
|
$caches = $cache->getMultiple(array(
|
||||||
'routes',
|
'routes',
|
||||||
'templates',
|
'templates',
|
||||||
@ -24,8 +29,9 @@ $caches = $cache->getMultiple(array(
|
|||||||
|
|
||||||
//if cache don't exist create it!
|
//if cache don't exist create it!
|
||||||
$cachesBool = $caches["routes"] === null || $caches['templates'] === null || $caches['forms'] === null;
|
$cachesBool = $caches["routes"] === null || $caches['templates'] === null || $caches['forms'] === null;
|
||||||
if (!($ap->isCacheEnabled()) || $cachesBool) {
|
if (!$ap->isCacheEnabled() || $cachesBool) {
|
||||||
$modulesDIR = __DIR__ . "/Modules";
|
$cache->clear();
|
||||||
|
$modulesDIR = dirname(__DIR__) . "/src/Modules";
|
||||||
$modules = array_diff(scandir($modulesDIR), array('..', '.'));
|
$modules = array_diff(scandir($modulesDIR), array('..', '.'));
|
||||||
/** @var string $module */
|
/** @var string $module */
|
||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
@ -65,7 +71,8 @@ if (!($ap->isCacheEnabled()) || $cachesBool) {
|
|||||||
}
|
}
|
||||||
$caches = $cache->getMultiple(array(
|
$caches = $cache->getMultiple(array(
|
||||||
'routes',
|
'routes',
|
||||||
'templates'
|
'templates',
|
||||||
|
'forms'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
//load each templates
|
//load each templates
|
Loading…
x
Reference in New Issue
Block a user