I created the advanced template skeleton app.
It’s working.
I must access it using www.domain.tld/www/frontend/web but of course I want to use as www.domain.tld/
So I saw this nice tutorial on official Wiki: http://www.yiiframework.com/wiki/755/how-to-hide-frontend-web-in-url-addresses-on-apache/
I create this WORKING .htaccess
into webroot
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ www/frontend/web/$1 [L]
</IfModule>
# Deny accessing below extensions
<Files ~ "(.json|.lock|.git)">
Order allow,deny
Deny from all
</Files>
# Deny accessing dot files
RewriteRule (^\.|/\.) - [F]
And this .htaccess into www/frontend/web
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Than I enabled pretty urls in www/frontend/config/main.php
'urlManager' => [
'baseUrl' => '/',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => []
]
Now using www.domain.tld I got the website working, with prettyurl, and all looks well.
But the debug toolbar is not working anymore.
I supposed it is trying to load something so I see this url
http://www.domain.tld/debug/default/toolbar?tag=54ca43f62e8ec
The loaded content is the index.php file… due the redirects.
How can I modify these files to allow debug toolbar working ?