作者plokijuh (疯人院院长)
看板FreeBSD
标题[请益] lighttpd rewrite 转换问题
时间Wed Apr 9 00:28:08 2008
目前主要的 web server 是采用 lighttpd
这几天一直尝试安装 dekiwiki
目前就到最後一步卡关了
问题在於 rewrite 的规则
官网只有提供 apache22 的写法
之前已经在 apache22 上有成功运作
现在换到 lighttpd 就在 rewrite 的规则转不过来
apache22 的写法
RewriteEngine On
#下面的一直改不出来
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ /index.php?title= [L,NE]
RewriteCond %{REQUEST_URI} ^/@gui/[^.]+$
RewriteRule ^/@gui/(.*)$ /proxy.php?path=$1 [L,QSA,NE]
#下面的都改好可运作
RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui)/
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !^/favicon\.ico$
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
我自己尝试改写的
url.rewrite-once = (
#下面四行就是卡住的地方
"^/$" => "/index.php?title=",
#"^/@gui/[^.]+$" => "$0",
"^/@gui/[^.]+$" => "/proxy.php?path=$1",
#下面改好可以动
"^/(@api|editor|skins|config|@gui)/(.*)" => "$0",
"^/index\.php(.*)" => "$0",
"^/favicon\.ico" => "$0",
"^/robots\.txt" => "$0",
"^/Special:Search\?search=(.*)" => "/index.php?search=$1",
"^/(.*)" => "/index.php?title=$1"
)
现在的问题在於 RewriteCond %{REQUEST_URI} ^/@gui/[^.]+$ 不知道怎样转成
lighttpd 的写法
另外 apache22 前四行改起来也怪怪的
算是可以动
就差最後一步
还请大大指教
谢谢
--
my blog
http://blog.cheyingwu.tw/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.62.138.17
※ 编辑: plokijuh 来自: 61.62.138.17 (04/09 00:30)
※ 编辑: plokijuh 来自: 61.62.138.17 (04/09 00:39)