基本上, Lifetype算是已經設好了, 但是簡潔網址的運作有點奇怪
目前的情況是:
http://www.xxx.com/username及
http://www.xxx.com/blogid這兩種模式都能運作
但是我其實明明是設 /blog/{username}$ 這種型式的
另外, 在Blog中的連結其實是用Blog ID為主,
例如文章的連結會變成
http://www.xxx.com/post/1/4雖然是不影響運作, 但真的感覺很怪, 改了很多次還是一樣...
附上我的.htaccess檔, 請高手幫我看一下, 謝謝!!!!:
AcceptPathInfo on
<Files .htaccess>
deny from all
</Files>
<Files config.properties.php>
deny from all
</Files>
Options -Indexes
Options +FollowSymLinks
<IfModule mod_php4.c>
php_value memory_limit "16M"
php_value include_path ":."
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex summary.php index.html index.php
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Permalink to the blog entry (i.e. /1_userfoo/archive/3_title-foo-bar.html)
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html$ index.php?op=ViewArticle&blogId=$1&articleId=$2 [L,NC]
# Monthly archive (i.e. /1_userfoo/archive/200401.html)
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html$ index.php?blogId=$1&Date=$2 [L,NC]
# -- same as above but with paging included
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html\.page\.([1-9]+)$ index.php?blogId=$1&Date=$2&page=$3 [L,NC]
# Daily archive (i.e. /1_blogfoo/archive/20040101.html)
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php?blogId=$1&Date=$2 [L,NC]
# -- same as above but with paging included
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html\.page\.([1-9]+)$ index.php?blogId=$1&Date=$2&page=$3 [L,NC]
# Album (i.e. /88_userfoo/albums/34_title-foo-bar.html)
RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html$ index.php?op=ViewAlbum&blogId=$1&albumId=$2 [L,NC]
# -- same as above but with paging included
RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html\.page\.([1-9]+)$ index.php?op=ViewAlbum&blogId=$1&albumId=$2&page=$3 [L,NC]
# Albums (i.e. /88_userfoo/albums/)
RewriteRule ^([0-9]+)_[^/]+/albums/$ index.php?op=ViewAlbum&blogId=$1&albumId=0 [L,NC]
# Category view (i.e. /88_userfoo/categories/4_cat-foobar.html)
RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html$ index.php?blogId=$1&postCategoryId=$2 [L,NC]
# -- same as above but with paging included
RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html\.page\.([1-9]+)$ index.php?blogId=$1&postCategoryId=$2&page=$3 [L,NC]
# Category-Feeds (i.e. /3_userfoo/feeds/categories/2_category/atom)
RewriteRule ^([0-9]+)_[^/]+/feeds/categories/([0-9]+)_[^.]+/(.*)$ rss.php?blogId=$1&categoryId=$2&profile=$3 [L,NC]
# Feeds (i.e. /3_userfoo/feeds/atom)
RewriteRule ^([0-9]+)_[^/]+/feeds/(.*)$ rss.php?blogId=$1&profile=$2 [L,NC]
# Trackbacks (i.e. /3_userfoo/trackbacks/34_title-foo-bar.html)
RewriteRule ^([0-9]+)_[^/]+/trackbacks/([0-9]+)_[^.]+\.html$ index.php?op=Trackbacks&blogId=$1&articleId=$2 [L,NC]
# Comment form (i.e. /88_userfoo/comment/34_title-foo-bar.html)
RewriteRule ^([0-9]+)_[^/]+/comment/([0-9]+)_[^.]+\.html$ index.php?op=Comment&blogId=$1&articleId=$2 [L,NC]
# Resources (i.e. /88_userfoo/resources/this-is-a-resource-name.pdf.html)
RewriteRule ^([0-9]+)_[^/]+/resources/([^.]+)\.([^.]+)\.html$ index.php?op=ViewResource&blogId=$1&resource=$2.$3 [L,NC]
# Download a resource (i.e. /88_userfoo/get/this-is-a-resource-name.pdf)
RewriteRule ^([0-9]+)_[^/]+/get/(.+)$ resserver.php?blogId=$1&resource=$2 [L,NC]
# A non-default blog (i.e. /88_userfoo)
RewriteRule ^([0-9]+)(_[^/]+)?$ index.php?blogId=$1 [L,NC]
# -- same as above but with paging included
RewriteRule ^([0-9]+)(_[^/]+)\.page\.([1-9]+)$ index.php?blogId=$1&page=$3 [L,NC]
# Static Pages (i.e /3_userfoo/demosites)
RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId=$1&show=$2 [NC]
</IfModule>
<Files post>
ForceType application/x-httpd-php
</Files>
<Files archives>
ForceType application/x-httpd-php
</Files>
<Files static>
ForceType application/x-httpd-php
</Files>
<Files rss>
ForceType application/x-httpd-php
</Files>
<Files category>
ForceType application/x-httpd-php
</Files>
<Files trackbacks>
ForceType application/x-httpd-php
</Files>
<Files comment>
ForceType application/x-httpd-php
</Files>
<Files resource>
ForceType application/x-httpd-php
</Files>
<Files get>
ForceType application/x-httpd-php
</Files>
<Files album>
ForceType application/x-httpd-php
</Files>
<Files blog>
ForceType application/x-httpd-php
</Files>
<Files user>
ForceType application/x-httpd-php
</Files>
<Files page>
ForceType application/x-httpd-php
</Files>
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php