Welcome Guest, Not a member yet? Register   Sign In
Htaccess, subdomains & subfolders ?

Hi guys,

Looking to implement some subfolders, where each have a Codeigniter FW.
All my subdomains goes to the "principal folder" and a .htaccess redirect there to the good folder, like that : 
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.apps\.xxx\.io
RewriteRule ^(.*)$ http://app.xxx.io/_deployed/%1/index.php/$1 [P,L]

Example : 
- app1.apps.xxx.io
- app2.apps.xxx.io
- etc...

In each "subfolder", I have another .htaccess for my codeigniter FW, but I think this implementation is not good :
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Anyone can save me ?  Big Grin

Thanks for your help.

Thanks for your reply, but multi-app can't help me in this specific case.

Maybe this will help you

Stupid .htaccess Tricks
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

(01-31-2019, 04:45 AM)InsiteFX Wrote: Maybe this will help you

Stupid .htaccess Tricks

Haha, I love the name.

Theme © iAndrew 2016 - Forum software by © MyBB