CodeIgniter Forums
how to install second website on subfolder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3)
+--- Thread: how to install second website on subfolder (/showthread.php?tid=70428)



how to install second website on subfolder - hanash20 - 04-07-2018

Dear All, 

i hope i can get a help from you, i am new to codeigniter, i have install main website on root, and i have another website which isntall in subfolder named "onyx".


the problem i have using routes for SEO friendly, and when i install the seond website on the subfolder i won't  work. 

it shows "404 Page Not Found".

you help is highly appreciatedd


RE: how to install second website on subfolder - jreklund - 04-08-2018

So what server softare are you using? Apache, Nginx etc
Here's examples on Apache, as it's normally what people use.

Code:
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteBase /onyx/
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ /onyx/index.php/$1 [L,QSA]
</IfModule>

Code:
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteBase /onyx/
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>