在Lighttpd設定Rewrite

| No Comments | No TrackBacks
lighttpd-inc.conf
-----------------------

確定server.modules 中的"mod_rewrite"是開啟的, 然後...

$HTTP["host"] == "localhost" {
  server.document-root = "C:\WLMP\HTDOCS\"
  url.rewrite = (
        "^/images/.*$" => "$0", // 如果是images 資料夾, 直接存取
        "^/(.*)$" => "index.php/$1" // 否則其他都導向 index.php
  ) 

    url.rewrite-once = (
              "^\/(images|css)(.*)$" => "$0", // 如果是images 或者 css 資料夾, 直接存取
              "^(((\/)([^\/^\?]*)){0,1})(((\?)(.*)){0,1})$" => "index.php?a=$4&$8" // 否則其他都導向 index.php
    )

  accesslog.filename = "C:\WLMP\LightTPD\logs\localhost-access_log.txt"
}

No TrackBacks

TrackBack URL: http://www.ode2forest.com/mt-tb.cgi/42

Leave a comment

About this Entry

This page contains a single entry by Gordon Lim published on October 16, 2009 7:07 PM.

解決在Ubuntu/Debian底下因更換網路卡或將硬碟安裝在另一台伺服器之後找不到eth0/網路的問題 was the previous entry in this blog.

允許root 用SSH登入Solaris的方法 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.