0

can someone help me remove this default 'index.php' in my url please. I've tried all possible solutions in the internet(I guess...) on how to remove this one. its been 2 days since I began to resolve this issue.

config.php

$host = gethostbyname($_SERVER['SERVER_NAME']);
$config['base_url'] = 'http://'.$host.':8080/rms/';
$config['index_page'] = ''; //-------------------->>>>>this should be blank, right?
$config['uri_protocol'] = 'REQUEST_URI';

I also have created a .htaccess inside the codeigniter folder where application, images, etc. are there.

.htaccess

RewriteEngine On
    RewriteBase /CodeIgniter/
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]

and then I enable rewrite_module in apache modules and restart all services a couple of times still not working.(oh men!) :-(

I did change the AllowOverride None to AllowOverride All in httpd.conf

EDIT: I really dont get what seems to be the problem because the first load of the first interface of my website is good but when the other controller controller/file.php is to be use, error pops out saying;

Not Found

The requested URL /rms/eITRMS/btnLoginOnClick/myuser/mypass was not found on this server.

DjayPediA
  • 17
  • 1
  • 9
  • Possible duplicate of [Get rid of Index.php in CodeIgniter URLs](http://stackoverflow.com/questions/23966361/get-rid-of-index-php-in-codeigniter-urls) – levi Nov 15 '16 at 04:05
  • Try with `RewriteBase /rms/` line in .htaccess file instead. – Tpojka Nov 15 '16 at 09:38

1 Answers1

0

I solved the problem by deleting the old one and creating new .htaccess in root directory contains;

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

Thanks for responding anyway ! ^_^

DjayPediA
  • 17
  • 1
  • 9