3

I have seen in sites which were built using CodeIngniter framework there there is 'index.php' in the URI. Is that necessary?.

For example: example.com/index.php/products/view/shoes

Is it possible to make it:

example.com/products/view/shoes

3 Answers 3

2

of course, you have to rewrite the routes with an .htaccess, here it is

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

1 Comment

+1 for linking to official documentation with a CI-specific solution.
1

Sites like this are making use of "mod_rewrite", a module for Apache. So long as mod_rewrite is installed on your web server, you can set htaccess rules that route a web request like /products/view/shoes through index.php (or whatever page you want). URL rewriting is a large topic with many facets and you'll be able to learn more through some Google searches.

Apache's URL Rewriting Guide

IIS Equivalent of mod_rewrite

Comments

1

Yes, and here is where the directions are

Comments

Your Answer

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