I am new the CodeIgniter and the index.php is being a pain in the ass.
I want some friendly URLs but my website is in a subfolder.
I installed the clean CodeIgniter installation, added another view for test purposes and this is what I am getting.
Page 1
http://www.example.com/webadmintest/
http://www.example.com/webadmintest/index.php/welcome/index
Page 2
http://www.example.com/webadmintest/index.php/welcome/byebye
This works perfect.
Now in the config file I changed to this:
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
And added this in the .htacces in the application folder(I don't know if this is the place or the root CodeIgniter folder)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
I stil can load the previous links but if I try to go to this ones it send me to the main www.example.com page.
Page 1
http://www.example.com/webadmintest/
http://www.example.com/webadmintest/welcome/index
Page 2
http://www.example.com/webadmintest/welcome/byebye
I have also tried using:
$config['base_url'] = '/webadmin/';
and
RewriteBase /webadmintest/
and
RewriteRule ^(.*)$ /webadmintest/index.php?/$1 [L]
As you can see this is not the typical problem, I mean probably if this was a standalone website I probably wont have this problem, but the requirements need the website to be a subfolder of a main website.
Thanks