Lighttp Rewrite Rule For WordPress

根目录安装是这样的:

url.rewrite-once = (
"^/(.*)?/?files/$" => "index.php",
"^/(.*)?/?files/(.*)" => "wp-content/blogs.php?file=$2",
"^/(wp-.*)$" => "$1",
"^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "$2",
"^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "$2",
"." => "index.php"
)

wordpress 可以自动实现 域名无 www 向有的跳转,其他程序可以依靠:

$HTTP["host"] !~ "^(www|mail|mysql)\.(domain\.org)$" {
  $HTTP["host"] =~ "^(.+\.)?(domain\.org)$" {
    url.redirect = (
      "^/(.*)" => "http://www.%2/$1"
    )
  }
}

实现跳转。

Related posts:

  1. htaccess 的一点用法
  2. URL Redirect 网址重定向的方法
  3. Debian/Ubuntu Apache Mod_Rewrite 安装
  4. VPS Ubuntu 上安装配置 Postfix + Courier (初级篇)
  5. PhpMyAdmin 错误 "Cannot load mysql extension. Please check your PHP configuration"
此条目发表在 Linux-Server 分类目录,贴了 , , , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已被标记为 *

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word