apache 2 web root:
Alias /yzoix "/yzoix/public"
<Directory "/yzoix/public">
Options FollowSymLinks
AllowOverride All
Allow from all
</Directory>
web directory:
/yzoix
-- app
-- public
-- index.php
-- .htaccess
And in the file .htacess
:
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /yzoix/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
#RewriteRule .* index.php/$0 [PT]
</IfModule>
The Routing:
$router->add('/:controller/:action/:params', array(
'namespace' => 'MY\Controllers',
'controller' => 1,
'action' => 2,
'params' => 3,
));
$router->add('/:controller', array(
'namespace' => 'MY\Controllers',
'controller' => 1
));
$router->notFound(array(
"controller" => "index",
"action" => "e404"
));
Then , the URL https://.../yzoix/ got 404 ERROR
This is correct: https://.../yzoix/index!
How to enable this URL:https://.../yzoix/ , that's without 'index
'