0
votes

I create website for Class-Project by using Codeigniter and want to remove index.php from URL.

I follow CodeIgniter removing index.php from url . It's work well in local server. But when I'm upload file to server that using Tomcat9 it doesn't work.

I'm found .htaccess doesn't work with tomcat right?

So how can I remove index.php from URL?

1
Are you sure you want to / have to use Tomcat for this? It's an unusual choice for a PHP project - Joni
The reason I use Tomcat because my TA provide this server for class-project. I have no choice. - Akrd Kmnc
Tomcat has a rewrite valve and the rewrite rules have the same syntax as Apache tomcat.apache.org/tomcat-9.0-doc/rewrite.html The rules must be put in a file called rewrite.config, an internet search brings up examples like stackoverflow.com/q/52090777/318758 - Joni

1 Answers

1
votes

You can remove index.php and set some thing else like question mark.
Go to
application->config->config.php
and set
$config['index_page'] = '?' .