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?

3
  • Are you sure you want to / have to use Tomcat for this? It's an unusual choice for a PHP project Commented Mar 12, 2019 at 21:03
  • The reason I use Tomcat because my TA provide this server for class-project. I have no choice. Commented Mar 12, 2019 at 22:14
  • 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 Commented Mar 13, 2019 at 0:19

1 Answer 1

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'] = '?' .

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.