Skip to content

Instantly share code, notes, and snippets.

@luoshu
Created December 30, 2010 03:30
Show Gist options
  • Save luoshu/759419 to your computer and use it in GitHub Desktop.
Save luoshu/759419 to your computer and use it in GitHub Desktop.
Nginx伪静态Emlog篇
location / {
if (!-f $request_filename)
{
set $rule_0 1$rule_0;
}
if (!-d $request_filename)
{
set $rule_0 2$rule_0;
}
if ($rule_0 = "21")
{
rewrite ^/(post|record|sort|author|page)-([0-9]+)\.html$ /index.php?$1=$2;
rewrite ^/(post|record|sort|author|page)/([0-9]+)$ /index.php?$1=$2;
}
rewrite ^/tag-(.+)\.html$ /index.php?tag=$1;
rewrite ^/tag/(.+)$ /index.php?tag=$1;
rewrite ^/t/page/([0-9]+)$ /t/index.php?page=$1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment