Lighttpd url.rewrite-once for html static fail - >指定的控制器无效

时间:2012-12-10 09:31:22

标签: html url-rewriting rewrite lighttpd

我正在使用lighhtpd和php。使用Zend Framework。

我只使用HTML代码放置了一个简单的页面test.html。当我试图看到它时,我收到一个错误:

指定的控制器无效(test.html):/ test.html

<!--                                                                                                                                                                                                                                                                                                                          
To change this template, choose Tools | Templates                                                                                                                                                                                                                                                                             
and open the template in the editor.                                                                                                                                                                                                                                                                                          
-->
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
    <div>TODO write content</div>
</body>
</html>

在我的conf(不是htaccess)

url.rewrite-once = (
  ".*\?(.*)$" => "/index.php?$1",
  ".*\.(js|ico|gif|jpg|png|css)$" => "$0",
  "" => "/index.php"
)

我迷路了。尝试几种选择而不理解问题。

1 个答案:

答案 0 :(得分:1)

好。

为问题道歉。

简单。

url.rewrite-once = (".*\?(.*)$" => "/index.php?$1",".*\.(js|ico|gif|jpg|png|css)$" => "$0","" => "/index.php")

已更改为

url.rewrite-once = (".*\?(.*)$" => "/index.php?$1",".*\(js|ico|gif|jpg|png|css|html)$" => "$0","" => "/index.php")