1

주제: Problem with .htaccess and lighttpd

Hello.
I know. This is not forum for user frm other countries but I have question about rewrite rules for Ligghtpd server. I want to have rules to make URLs like /blogname/owner etc. Ive made something like this:

$HTTP["remoteip"] == "127.0.0.2" {
    server.document-root = "/var/www/tc/"
    url.rewrite-once = (
        "^(thumbnail)/([0-9]+/.+)$" => "cache/$1/$2",
        "^(cache)+/+(.+[^/])\.(cache|xml|txt|log)$" => "$0",
        "^(.*[^/])$" => "$1/",
        "^(.*)$" => "rewrite.php"
    )
}

It works only when adress looks like http://127.0.0.2/grom/owner/ but dont work if I have URL like http://127.0.0.2/grom/owner so as I think problem is with "^(.*[^/])$" => "$1/" but how to correct that? Any suggestions? Any advice? If someone knows how to resolve that then please tell me ;P

Best regards, Grom.

2

답글: Problem with .htaccess and lighttpd

RewriteEngine On
RewriteBase /tc/
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(cache)+/+(.+[^/])\.(cache|xml|txt|log)$ - [NC,F,L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(thumbnail)/([0-9]+/.+)$ cache/$1/$2 [L]
RewriteRule ^(.*)$ rewrite.php [L,QSA]

위 룰을 lighttpd 웹 서버에도 적용해 보고 싶은데 잘 안되어서 여기까지 오게되었습니다. (__)

lighttpd rewrite 써서 비슷하게 룰은 지정 하였지만 특정 URL 을 찾지 못하네요 T_T
페이징 문제도 있구요 -0-

Apache 웹 서버를 많이 사용 하지만 리소스 점유률이 낮은 Lighttpd 웹 서버도 공식으로 지원해 주셨으면 합니다. 물론 rewrite 기능을 끄고 사용은 가능 하지만 URL 깔끔하게 하고 싶어서 이렇게 글 남깁니다.