Welcome Guest, Not a member yet? Register   Sign In
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


Messages In This Thread
Htaccess, subdomains & subfolders ? - by devtoo - 01-30-2019, 08:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB