• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.

https://www.codeigniter.com/user_guide/g..._apps.html might 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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.