Kohana URL,包括重定向和分页索引 [英] Kohana URLs including index on redirects and pagination

查看:114
本文介绍了Kohana URL,包括重定向和分页索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用重定向时,KO3核心在将index.php插入URL时遇到问题
Request :: instance()-> redirect('something');或$ paginationStuffHere-> render().

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().

这两个结果之一都是 http://www.something.com/ index .php /something

The result of either of these is http://www.something.com/index.php/something

当我使用完整URL而不是诸如Request :: instance()-> redirect('http://www.something.com/something')之类的亲戚进行重定向时,这不是问题.但是实际上没有办法用分页功能来做到这一点...我已经找到了,所以我真的需要找到它在哪里添加了这个index.php

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

当我使用View :: factory('something/something')-> render();时不会发生这种情况;这是我唯一能够找到遇到类似问题的人的

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

在bootstrap.php中,基本URL设置为'/'

The base URL is set to '/' in bootstrap.php

我的.htaccess看起来像这样

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.

推荐答案

在bootstrap.php中查找Kohana :: init()并将该数组中的index_file设置为FALSE

Find Kohana::init() in your bootstrap.php and set index_file to FALSE in that array

这篇关于Kohana URL,包括重定向和分页索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆