English 中文(简体)
Ko3 - URL Reping problem - Removing Index.php
原标题:Ko3 - URL Rewriting problem - Removing index.php

I m 利用Kohana 3开发一个网站(当时我使用一个框架)。 在当地,一切都完美无缺。 目前,我有一个缺省模板控制器、多语文支助和我的索引。 工厂被正确地拆除。 因此,在继续之前,如果我在服务器上工作,我就进行了测试,我会走一个无休止的路。

我沿用了非正式的维基语进行多语言执行:。 http://www.kerkness.ca/wiki/doku.php?id=example_of_a_multi-language_website

A redirection to the default language occurs if the language is not specified in the uri so I figured the problem might have come from there even though it worked locally, so I removed it to see what happens without the redirection. Now, I can see my home page, but whatever the uri is in the web browser, the home page will always be called. I inserted the following line in my home view to check what the uri was: request::instance()->uri() and effectively, the uri is always: /en/home/

我将指数.php(在boot子里)重新计算,所有东西都再次进行罚款,甚至改用默认的语言。

我的第一位猜测是,里文是正确写的,因此,我试图改变access语,但没有成功。

这里,我是:

# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /dev/
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(application|modules|system)/ - [F,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]

(b) 在非官方的维基中,我还尝试了其他的《礼仪规则》,要么没有工作。

Additional info: Host: WebHostingPad Apache: v2.2.11 PHP: 5.2.9

Rewrite_ 模块启动

感谢你, 我真的希望得到你们的帮助,因为我早就在几天前试图确定这一点,而且我确实开始对我说话。

最佳回答

问题来自<代码>_美元 SERVER[PATH_INFO] , 退回无价值......

这个问题可以通过将以下一线添加到php。

cgi.fix_pathinfo=0
问题回答

为了摆脱指数,你必须改变的唯一东西。 URL的站点将设置在Kohaana的档案链:init(bootsgil.php)到FALSE(其他一切都会造成错误)。

因此,Kohaana:init就是这样做的;

Kohana::init(array(
     base_url       =>  / ,
     index_file     => FALSE,

;

如果它与原来的“htaccess”合作,就没有必要改变。





相关问题
URL rewrite in IIS6 - Third party tools

I have collected the following api/sdk/whatever which provide modules for doing url rewriting in IIS 5/6/7. Some are free-open source and some require $. I haven t tried any of them. I would like to ...

Rewrite spring-security redirect URLs

I m trying to get Tuckey UrlRewriteFilter to tidy up URLs for my webapp. One problem I ve got is that when spring-security notices that an anonymous user is trying to access a protected resource it ...

ASP.NET Friendly URLs

In my research, I found 2 ways to do them. Both required modifications to the Application_BeginRequest procedure in the Global.Asax, where you would run your code to do the actual URL mapping (mine ...

Could I get by HttpModule the URL that contains * before?

My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this: http://my-site.com/address And I would support *...

Domains & Foreward Slash

This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b....

URL Mod-Rewrite

I currently have a working URL: http://example.com/security-services.php?service=fixed-camera-surveillance and then I have PHP say, $_REQUEST[ service ] to do some stuff... But I d like to ...

热门标签