I would like to add a folder called html at the root. In this folder i will have the images, js, css ect. I did .htaccess in the root with:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ html/ [L]
RewriteRule (.*) html/$1 [L]
</IfModule>
i also had copied over the index.php from the root to the html path. Inside the html/.htaccess file I have:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
Also inside the index.php file, I had changed the path’s to:
$system_path = '../system';
$application_folder = '../application';
The result comes with a 404 error page styled from codeigniter.
Use the URL helper always will fix the issue, Make sure your js and images are in root.
Ex.