[linux] phalcon 잡다.

|

.htaccess


<IfModule mod_rewrite.c>

    RewriteEngine on

    RewriteRule  ^$ public/    [L]

    RewriteRule  ((?s).*) public/$1 [L]

</IfModule>


-----------------------------------------------------------------


/public/.htaccess


AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L]

</IfModule>


-----------------------------------------------------------------

.htrouter.php


$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));


if ($uri !== '/' && file_exists(__DIR__ . '/public' . $uri)) {

    return false;

}


$_GET['_url'] = $_SERVER['REQUEST_URI'];


require_once __DIR__ . '/public/index.php';



And