mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 19:02:12 +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>
|
||||
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>
|
||||
|
||||
|
||||
# RedirectMatch 403 ^/vendor/*$
|
||||
ErrorDocument 403 /src/index.php
|
||||
ErrorDocument 403 /index.php
|
||||
|
||||
|
||||
<FilesMatch ".*\.(php|html|twig|json)$">
|
||||
<FilesMatch ".*\.(php)$">
|
||||
<IfVersion < 2.4>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
@ -16,6 +16,11 @@ $ap = AdminPanel::getInstance();
|
||||
2: match routes directly with modules
|
||||
*/
|
||||
$cache = $ap->getCache();
|
||||
|
||||
if (!$ap->isCacheEnabled()) {
|
||||
$cache->clear();
|
||||
}
|
||||
|
||||
$caches = $cache->getMultiple(array(
|
||||
'routes',
|
||||
'templates',
|
||||
@ -24,8 +29,9 @@ $caches = $cache->getMultiple(array(
|
||||
|
||||
//if cache don't exist create it!
|
||||
$cachesBool = $caches["routes"] === null || $caches['templates'] === null || $caches['forms'] === null;
|
||||
if (!($ap->isCacheEnabled()) || $cachesBool) {
|
||||
$modulesDIR = __DIR__ . "/Modules";
|
||||
if (!$ap->isCacheEnabled() || $cachesBool) {
|
||||
$cache->clear();
|
||||
$modulesDIR = dirname(__DIR__) . "/src/Modules";
|
||||
$modules = array_diff(scandir($modulesDIR), array('..', '.'));
|
||||
/** @var string $module */
|
||||
foreach ($modules as $module) {
|
||||
@ -65,7 +71,8 @@ if (!($ap->isCacheEnabled()) || $cachesBool) {
|
||||
}
|
||||
$caches = $cache->getMultiple(array(
|
||||
'routes',
|
||||
'templates'
|
||||
'templates',
|
||||
'forms'
|
||||
));
|
||||
}
|
||||
//load each templates
|
Loading…
x
Reference in New Issue
Block a user