Kohana URL 包括重定向和分页索引
当我使用重定向时,KO3 核心将 index.php 插入我的 URL 时遇到问题
请求::instance()->redirect('something');或 $paginationStuffHere->render()。
其中任何一个的结果都是 http://www.something.com/index.php< /strong>/something
当我使用完整的 URL 进行重定向而不是像 Request::instance()->redirect('http://www.something.com/something'); 这样的亲戚时,这不是问题。但实际上并没有办法用我发现的分页功能来做到这一点...所以我真的需要找到它在哪里添加这个index.php
当我使用 View::factory('something /某事')->渲染();这是我能找到有类似问题的人的唯一方法
The base URL is set to '/' in bootstrap.php
我的 .htaccess 看起来像这样
RewriteEngine On
RewriteBase /
RewriteRule ^(application|modules|system) -[F,L]
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule .* index.php/$0 [PT,L]
提前感谢您的任何建议。
I am having an issue with the KO3 core inserting index.php into my URL's when I use redirect
Request::instance()->redirect('something'); or $paginationStuffHere->render().
The result of either of these is http://www.something.com/index.php/something
This is not an issue when I use full URL's for the redirects instead of relatives such as Request::instance()->redirect('http://www.something.com/something'); but there is not really a way to do this with the pagination functions... that I have found, so I really need to find where it is adding this index.php
This does not occur when I use View::factory('something/something')->render(); which is the only thing I have been able to find people having similar problems with
The base URL is set to '/' in bootstrap.php
My .htaccess looks like this
RewriteEngine On
RewriteBase /
RewriteRule ^(application|modules|system) -[F,L]
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule .* index.php/$0 [PT,L]
Thanks in advance for any suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 bootstrap.php 中找到 Kohana::init() 并将该数组中的 index_file 设置为 FALSE
Find Kohana::init() in your bootstrap.php and set index_file to FALSE in that array