Geeklog-Core / geeklog

Geeklog - The Secure CMS.
https://www.geeklog.net
24 stars 19 forks source link

No 404 error for URL routing (without index.php) #1057

Closed hirorongl closed 4 years ago

hirorongl commented 4 years ago

No 404 error when using URL routing (without index.php)

Call Function PLG_showCenterblock();

index.php : 166

if (!$displayAll) {
    // give plugins a chance to replace this page entirely
    $newContent = PLG_showCenterblock(0, $page, $current_topic);
    if (!empty($newContent)) {
        COM_output($newContent);
        exit;
    }
}

$displayALL = (empty) $page = 1 $current_topic = (empty)

URL) https://dokoka.dom/bbbb

$_SERVER=Array
(
    [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    [TEMP] => /var/www/clients/client0/web2/tmp
    [TMPDIR] => /var/www/clients/client0/web2/tmp
    [TMP] => /var/www/clients/client0/web2/tmp
    [HOSTNAME] => 
    [USER] => web2
    [HOME] => /var/www/clients/client0/web2
    [SCRIPT_NAME] => /index.php
    [REQUEST_URI] => /bbbb
    [QUERY_STRING] => /bbbb
    [REQUEST_METHOD] => GET
    [SERVER_PROTOCOL] => HTTP/1.1
    [GATEWAY_INTERFACE] => CGI/1.1
    [REDIRECT_QUERY_STRING] => /bbbb
    [REDIRECT_URL] => /bbbb
    [REMOTE_PORT] => 60562
    [SCRIPT_FILENAME] => /var/www/clients/client0/web2/web/index.php
    [SERVER_ADMIN] => webmaster@dokoka.dom
    [CONTEXT_DOCUMENT_ROOT] => /var/www/clients/client0/web2/web
    [CONTEXT_PREFIX] => 
    [REQUEST_SCHEME] => https
    [DOCUMENT_ROOT] => /var/www/clients/client0/web2/web
    [REMOTE_ADDR] => 11.22.33.44
    [SERVER_PORT] => 443
    [SERVER_ADDR] => 10.1.2.79
    [SERVER_NAME] => dokoka.dom
    [SERVER_SOFTWARE] => Apache
    [SERVER_SIGNATURE] => 
    [HTTP_CACHE_CONTROL] => no-cache
    [HTTP_PRAGMA] => no-cache
    [HTTP_UPGRADE_INSECURE_REQUESTS] => 1
    [HTTP_COOKIE] => theme=denim_three; language=english_utf-8; timezone=Asia%2FTokyo; gl_session=12204771; GLSESSION=p286vj251m0d8acjst6c8et4c45hqdh1qv15ia3f; geeklog=bc094d45df0b5738d101f6441c22add99a146a6a
    [HTTP_CONNECTION] => keep-alive
    [HTTP_ACCEPT_ENCODING] => gzip, deflate, br
    [HTTP_ACCEPT_LANGUAGE] => ja,en-US;q=0.7,en;q=0.3
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0
    [HTTP_HOST] => dokoka.dom
    [proxy-nokeepalive] => 1
    [SSL_TLS_SNI] => dokoka.dom
    [HTTPS] => on
    [SCRIPT_URI] => https://dokoka.dom/bbbb
    [SCRIPT_URL] => /bbbb
    [REDIRECT_STATUS] => 200
    [REDIRECT_SSL_TLS_SNI] => dokoka.dom
    [REDIRECT_HTTPS] => on
    [REDIRECT_SCRIPT_URI] => https://dokoka.dom/bbbb
    [REDIRECT_SCRIPT_URL] => /bbbb
    [FCGI_ROLE] => RESPONDER
    [PHP_SELF] => /index.php
    [REQUEST_TIME_FLOAT] => 1586168962.1962
    [REQUEST_TIME] => 1586168962
)

Apache2: 2.4.25 PHP: 7.4 (PHP-FPM)

Geeklog Configuration Enable URL Rewrite: True Enable URL Routing: Enabled(without "index.php")

.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
#    RewriteBase /
    # Directs all Geeklog requests through the site index file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
eSilverStrike commented 4 years ago

Related to #1056 which will be used as the main discussion about this issue so closing this one.