LifeType 中文開發論壇

測試 => LifeType 1.1 測試 => 主題作者是: btfans 於 九月 16, 2006, 06:05:35 下午



主題: LT 1.1 simplified URL (簡潔綱址) problem
作者: btfans九月 16, 2006, 06:05:35 下午

簡潔綱址
不能認出

http://mydomain.com/lifetype/1

如何解決 ?

http://mydomain.com/lifetype (ok)


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: crdotlin九月 16, 2006, 07:48:59 下午
改回一般網址後
再改回簡潔網址試試


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: btfans九月 17, 2006, 07:06:58 上午
Still not ok ....


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: catseyes九月 17, 2006, 07:42:46 上午
.htaccess的設定能夠貼出來看一下嗎!?


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: btfans九月 17, 2006, 09:39:24 上午
my .htaccess

it is original, only changed:

ErrorDocument 401 /lifetype/error.php
ErrorDocument 403 /lifetype/error.php
ErrorDocument 404 /lifetype/error.php


程式碼:

<Files .htaccess>
deny from all
</Files>

<Files config.properties.php>
deny from all
</Files>

Options -Indexes
Options +FollowSymLinks

<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 /lifetype/error.php
ErrorDocument 403 /lifetype/error.php
ErrorDocument 404 /lifetype/error.php


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: 大雄九月 17, 2006, 07:06:15 下午
原來的
RewriteBase /

改為
RewriteBase /lifetype/

另外,注意 .htaccess 是否為777


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: walteriii九月 17, 2006, 08:59:55 下午
我已经解决这个问题,虽然解决得不漂亮

3. 分页器有问题!我们的博客站启用了二级域名和自定网址,现在的地址格式是这样的:

      http://username.nklog.org/  比如  http://momo.nklog.org

    默认情况下,分页会变成这样  http://momo.nklog.org/12    这就出现了问题,首页还是我的,点了分页
后就跑到其他人的博客那里去了。

    后来我又尝试了其它几种地址方式,发现在简单模式和适宜搜索引擎两种模式下分页是正常的,其它的
就不行了,在适宜搜索引擎模式下,我的分页地址显示为
 
           http://momo.nklog.org/1/page/12  我是一号博客,所以加了一个 1 上去。

    但这个引用方式只有在启用适宜搜索引擎这个模式的情况下才起作用,换回自定网址模式后就无效了,
最后没办法,只好在 page_suffix_format 中添加了这样一段后缀:

          index.php?op=Default&page=

    这样所有的分页都会显示为:

           http://momo.nklog.org/index.php?op=Default&page=12   这种格式,也就是简单模式,这才算勉强解决问题。


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: catseyes九月 18, 2006, 08:45:35 上午
你的自訂網址模式好像有把 blogid 這參數放進去那個 1 才會跑出來啦 ^^ 這是我的推斷

要不檢查一下你的自訂網址的格式是否正確呢!? ^^


主題: Re: LT 1.1 simplified URL (簡潔綱址) problem
作者: btfans九月 18, 2006, 10:00:48 上午
Thanks 大雄 ....

OK !