开发者

MVC in Codeigniter Framework

开发者 https://www.devze.com 2023-03-19 03:43 出处:网络
I have seen in sites which were built using CodeIngniter framework there there is \'index.php\' in the URI. Is that necessary?.

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


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


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


Yes, and here is where the directions are

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号