CodeIgniter Forums
Same Question NOT Found Answer: Using Sub Folder As ROOT - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Same Question NOT Found Answer: Using Sub Folder As ROOT (/showthread.php?tid=58498)



Same Question NOT Found Answer: Using Sub Folder As ROOT - El Forum - 06-17-2013

[eluser]Unknown[/eluser]
Hi. i read same question but i could not find the near answer. There is a web folder architecture that is recommended by expert CI'ers -by the way i am new at CI :

Code:
WEB ROOT
    system
    app
    public
        img
        js
        css
        index.php

i tried above with .htaccess file:

Code:
RewriteEngine On

RewriteRule ^$ /public/ [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1

This is throwing CI's 404 not found. when url like that http://example.com/welcome.php

in welcome.php, app and system folder variables changed as ../application and ../system. And i don't want to see sub folder name (public) in url. Is there any solution? Thank you


Same Question NOT Found Answer: Using Sub Folder As ROOT - El Forum - 06-17-2013

[eluser]Unknown[/eluser]
ok. no answer from community. the problem solving is found for now. change config.php $config['uri_protocol'] into 'PATH_INFO' from 'AUTO'. i suppose this doesn't make unexpected stuation for my project in future. thanks anyway