nigix 沒用過,不過,簡潔網址需要 web server 支援 pathinfo ,給你參考。
lss
謝謝 lss, 我後來找了 pathinfo 和 nginx 的資料, 可惜沒辦法搞定
後來直接修改 class/net/prettyrequestparser.class.php
不過 rss 會有問題 -----> 放棄
最好只好手工刻 nginx 的 rewrite 來符何蕳潔網址的規定
而這樣 error page 就不用指到 error.php
location /blog {
# Permalink to the blog entry (i.e. /1_userfoo/archive/3_title-foo-bar.html)
rewrite ^/blog/post/([0-9]+)/([0-9]+)$ /blog/index.php?op=ViewArticle&blogId=$1&articleId=$2 last;
# -- same as above but with paging included
rewrite ^/blog/post/([0-9]+)/([0-9]+)/page/([1-9]+)$ /blog/index.php?op=ViewArticle&blogId=$1&articleId=$2&page=$3 last;
# Monthly archive (i.e. /1_userfoo/archive/200401.html)
rewrite "^/blog/archives/([0-9]+)/([0-9]{6})$" /blog/index.php?blogId=$1&Date=$2 last;
# -- same as above but with paging included
rewrite "^/blog/archives/([0-9]+)/([0-9]{6})/page/([1-9]+)$" /blog/index.php?blogId=$1&Date=$2&page=$3 last;
# Daily archive (i.e. /1_blogfoo/archive/20040101.html)
rewrite "^/blog/archives/([0-9]+)/([0-9]{8})$" /blog/index.php?blogId=$1&Date=$2 last;
# -- same as above but with paging included
rewrite "^/blog/archives/([0-9]+)/([0-9]{8})/page/([1-9]+)$" /blog/index.php?blogId=$1&Date=$2&page=$3 last;
#user
rewrite ^/blog/user/([0-9]+)/([0-9]+)$ /blog/index.php?blogId=$1&userId=$2 last;
# Album (i.e. /88_userfoo/albums/34_title-foo-bar.html)
rewrite ^/blog/album/([0-9]+)/([0-9]+)$ /blog/index.php?op=ViewAlbum&blogId=$1&albumId=$2 last;
# -- same as above but with paging included
rewrite ^/blog/album/([0-9]+)/([0-9]+)/page/([1-9]+)$ /blog/index.php?op=ViewAlbum&blogId=$1&albumId=$2&page=$3 last;
# Albums (i.e. /88_userfoo/albums/)
rewrite ^/blog/album/([0-9]+)$ /blog/index.php?op=ViewAlbum&blogId=$1&albumId=0 last;
# Category view (i.e. /88_userfoo/categories/4_cat-foobar.html)
rewrite ^/blog/category/([0-9]+)/([0-9]+)$ /blog/index.php?blogId=$1&postCategoryId=$2 last;
# -- same as above but with paging included
rewrite ^/blog/category/([0-9]+)/([0-9]+)/page/([1-9]+)$ /blog/index.php?blogId=$1&postCategoryId=$2&page=$3 last;
# Category-Feeds (i.e. /3_userfoo/feeds/categories/2_category/atom)
rewrite ^/blog/rss/([0-9]+)/([0-9]+)/(.*)$ /blog/rss.php?blogId=$1&categoryId=$2&profile=$3 last;
# Feeds (i.e. /3_userfoo/feeds/atom)
rewrite ^/blog/rss/(.*)/([0-9]+)$ /blog/rss.php?blogId=$2&profile=$1 last;
# Trackbacks (i.e. /3_userfoo/trackbacks/34_title-foo-bar.html)
rewrite ^/blog/trackbacks/([0-9]+)/([0-9]+)$ /blog/index.php?op=Trackbacks&blogId=$1&articleId=$2 last;
# Comment form (i.e. /88_userfoo/comment/34_title-foo-bar.html)
rewrite ^/blog/comment/([0-9]+)/([0-9]+)$ /blog/index.php?op=Comment&blogId=$1&articleId=$2 last;
# Resources (i.e. /88_userfoo/resources/this-is-a-resource-name.pdf.html)
rewrite ^/blog/resource/([0-9]+)/([0-9]+)$ /blog/index.php?op=ViewResource&blogId=$1&resId=$2 last;
# Download a resource (i.e. /88_userfoo/get/this-is-a-resource-name.pdf)
rewrite ^/blog/get/([0-9]+)/(.+)$ /blog/resserver.php?blogId=$1&resource=$2 last;
# A non-default blog (i.e. /88_userfoo)
rewrite ^/(blog/)+([0-9]+)$ /blog/index.php?blogId=$1 last;
# -- same as above but with paging included
rewrite ^/blog/([0-9]+)/page/([1-9]+)$ /blog/index.php?blogId=$1&page=$2 last;
rewrite ^/blog/$ /blog/index.php?blogId=1 last;
# Static Pages (i.e /3_userfoo/demosites)
rewrite ^/blog/static/([0-9]+)/(.+)$ /blog/index.php?op=Template&blogId=$1&show=$2 last;
}