When I use the form::open in Kohana 3, I get this
<form action="/my-site/index.php/bla" method="post" accept-charset="utf-8">
Nowhere on my site do I rely on the index.php being there. I think it looks ugly. Is there an easy way to remove the index.php from it.
Obviously I know I could do a str_replace(), but I thought there may be a more elegant way?
Kohana (as well as CodeIgniter and most of other frameworks) relies on the Front-Controller Pattern (
index.php) so unless you deeply hacked it I cannot see how you don’t need to rely on it.After a quick look at the
form::open()source:I don’t think it’s possible without specifying a absolute URL. Might be a solution if you don’t mind doing:
Otherwise your best approach would be to
str_replace()or override the it with an application helper.If you edit the
urlhelper (/system/classes/kohana/url.php) and change line 71 from this:To this:
All
index.phpappearances should be gone.I’m not sure if this will work, but in
application/bootstrap.phpchange this:To this: