0

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?

Akrd Kmnc
  • 92
  • 7
  • Are you sure you want to / have to use Tomcat for this? It's an unusual choice for a PHP project – Joni Mar 12 '19 at 21:03
  • The reason I use Tomcat because my TA provide this server for class-project. I have no choice. – Akrd Kmnc Mar 12 '19 at 22:14
  • Tomcat has a rewrite valve and the rewrite rules have the same syntax as Apache https://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 https://stackoverflow.com/q/52090777/318758 – Joni Mar 13 '19 at 00:19

1 Answers1

1

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

Mehdi Zamani
  • 323
  • 2
  • 10