sruupl / batflat

Lightweight, fast and easy CMS for free. Bootstrap ready. https://batflat.org
MIT License
134 stars 54 forks source link

404 #35

Closed datsdev closed 5 years ago

datsdev commented 5 years ago

404 Page is not working with the delivered .htaccess.. I cannot assign any ErrorDocument 404 /404.html (or any other relative/absolute link)

I think the htaccess is messing with the configs?

# Prevent directory listings
Options -Indexes

# Prevent visitors from viewing files directly
<FilesMatch "\.(sdb|md|html|txt)$">
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
        Satisfy All
    </IfModule>
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
</FilesMatch>

# URL rewrites
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(inc/|themes/|tmp/).*\.(php|html)$ - [F,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.php [L]
</IfModule>
klocus commented 5 years ago

Hello,

You have to create 404 page in Batflat. Just create a new page with slug "404" ;-)

joachim97 commented 3 years ago

Batflat ma kilka błędów których nie poprawili Twórcy w wersji 1.3.6. Najważniejszym błędem jest to, że strona wyświetla się jako strona 404. Aby to naprawić wystarczy w pliku "batflat-master\inc\core\lib\Router.php" zmienić 64 linię ($url = trim(preg_replace('#'.$url.'#', '', $_SERVER['PATH_INFO'], 1), '/'); na $url = trim(str_replace($url, '',$_SERVER['PATH_INFO']), '/');. I błąd 404 znika.