<IfModule mod_rewrite.c>Thanks to all people who will think about my problem :)
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Add trailing slash after apps uri if no exists
RewriteRule ^(.*)login$ /login/ [L,R=301]
RewriteRule ^(.*)domain$ /domain/ [L,R=301]
RewriteRule ^(.*)work$ /work/ [L,R=301]
# Redirect to each apps
RewriteRule ^login(.*)$ public/login/$1 [L]
RewriteRule ^domain(.*)$ public/domain/$1 [L]
RewriteRule ^work(.*)$ public/work/$1 [L]
# Redirect in case of no application specified
RewriteRule ^(.*)$ public/login/ [L]
</IfModule>
<?php
return array(
'paths' => array(
'../../assets/',
'assets/'
),
'folders' => array(
'css' => array(),
'js' => array(),
'img' => array(),
),
/**
* URL to your Fuel root. Typically this will be your base URL:
*
* \Config::get('base_url')
*
* These MUST include the trailing slash ('/')
*/
'url' => \Config::get('base_url'),
'add_mtime' => true,
'indent_level' => 1,
'indent_with' => "\t",
'auto_render' => true,
'fail_silently' => false,
'always_resolve' => false,
);
<IfModule mod_rewrite.c>I think that it's not the best solution :/... Have you any idea about this problem ?
RewriteEngine On
RedirectMatch ^/$ /login/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^login(.*)$ /apps/login/index.php/$1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^work(.*)$ /apps/work/index.php/$1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^domain(.*)$ /apps/domain/index.php/$1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule $ /apps/login/index.php/404/ [L]
</IfModule>
<IfModule mod_rewrite.c>But now I have trouble to use multiple paths for assets, my configuration in each apps for assets paths is the following:
Options +FollowSymLinks
RewriteEngine On
RedirectMatch ^/$ /login/
RewriteRule ^(.*?)\.(php|css|js|jpg|jpeg|png|pdf)$ - [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^login(.*)$ /apps/login/index.php/$1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^work(.*)$ /apps/work/index.php/$1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^domain(.*)$ /apps/domain/index.php/$1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule $ /login/ [L,R=302]
</IfModule>
'paths' => array(But generated url use only the last path of the array even if the asset does not exist :/
'assets/',
'apps/login/assets/',
),
It looks like you're new here. If you want to get involved, click one of these buttons!