使用PHP CodeIgniter进行URL路由入门 [英] Getting started with URL routing with PHP CodeIgniter
本文介绍了使用PHP CodeIgniter进行URL路由入门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是想路由我的网址,就像
I just thought of routing my URLs which is like
http://localhost/codeigniter_cup_myth/index.php/adminController/mainAccount
如果真的很不错
http://localhost/codeigniter_cup_myth/Accounts/mainAccount
在Web应用程序中路由URL时应该从哪里开始?
Where should I start when routing URLs in my web application?
推荐答案
此外,添加以下内容:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
删除您的.htaccess文件中的index.php部分
to your .htaccess file will get rid of the index.php part
这篇关于使用PHP CodeIgniter进行URL路由入门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文