• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Htaccess, subdomains & subfolders ?

#1
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 : 
Code:
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 :
Code:
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.
Reply

#2
https://www.codeigniter.com/user_guide/g..._apps.html might help?
Reply

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

#4
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 )
Reply

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

Stupid .htaccess Tricks

Haha, I love the name.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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