CodeIgniter Forums

Full Version: Same Question NOT Found Answer: Using Sub Folder As ROOT
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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