Kohana URLs including index on redirects and pagination

断了今生、忘了曾经 提交于 2019-12-07 05:38:51

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/5135594/kohana-urls-including-index-on-redirects-and-pagination

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!