歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 27, 2024, 02:29:52 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  簡潔網址的怪問題... « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 簡潔網址的怪問題...  (閱讀 17105 次)
kitleong2006
新手見習
*
文章: 8


檢視個人資料
« 於: 九月 18, 2006, 03:48:47 下午 »

基本上, 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

已記錄

我的LifeType測試環境:
Win XP/Microsoft Virtual PC 2004/FC 4/Apache 2.2/PHP 5.1.2/MySQL 4.2.2/LifeType 1.1/GD 2/
kitleong2006
新手見習
*
文章: 8


檢視個人資料
« 回覆文章 #1 於: 九月 18, 2006, 03:54:59 下午 »

忘了說,

我希望呈現的簡潔網址的型式是:

http://www.xxx.com/username/1  ( or http://www.xxx.com/username/post/1 之類的)

而不是
http://www.xxx.com/post/1

請問有辦法嗎?? 謝謝
已記錄

我的LifeType測試環境:
Win XP/Microsoft Virtual PC 2004/FC 4/Apache 2.2/PHP 5.1.2/MySQL 4.2.2/LifeType 1.1/GD 2/
catseyes
一般會員
***
文章: 189


是我啦是我啦!


檢視個人資料 個人網站
« 回覆文章 #2 於: 九月 18, 2006, 05:55:17 下午 »

簡潔網址 or 自定網址!?!?要先分清楚喔...你要的應該是自定網址吧!?
已記錄

我的 B-LOG
http://blog.catseyes.com.tw/index.php?blogId=1

虛擬主機資訊
24cc.com 主機
主機系統  Linux
主機類型  i686
Apache 版本 1.3.34 (Unix)
PHP 版本 4.4.1
MySQL 版本 4.1.14-standard-log
=======================
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #3 於: 九月 18, 2006, 05:57:03 下午 »

你要的網址,必需用「自訂網址」才能做到。簡潔網址的形式是固定的,是以 blogId 、 postId 、 resourceId ... 各種 Id 組成的。

lss
已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
kitleong2006
新手見習
*
文章: 8


檢視個人資料
« 回覆文章 #4 於: 九月 18, 2006, 08:09:35 下午 »

喔... 了解, 原來我一直搞錯了, 我再試試...  害羞

謝謝回答!!! 開懷大笑
已記錄

我的LifeType測試環境:
Win XP/Microsoft Virtual PC 2004/FC 4/Apache 2.2/PHP 5.1.2/MySQL 4.2.2/LifeType 1.1/GD 2/
kitleong2006
新手見習
*
文章: 8


檢視個人資料
« 回覆文章 #5 於: 九月 18, 2006, 09:03:05 下午 »

改用自訂網址後, 大部分功能都正常了,

不過在資料夾(相簿)中僅能顯示有那些資料夾及那些檔案, 但無法顯示預覽圖, 中等大小圖及完整大小的圖都不能用, 應該是resource下的都不能用,
我的album_link_format:
/{blogowner}/resource/{albumid}$

resource_link_format:
/{blogowner}/resource/{albumid}/{resourceid}$

resource_preview_link_format
/{blogowner}/resource/{albumid}/preview/{resourceid}$

resource_medium_size_preview_link_format
/{blogowner}/resource/{albumid}/preview_med/{resourceid}$

resource_download_link_format
/{blogowner}/resource/{albumid}/download/{resourceid}$

不知是否有那邊設錯呢?? 謝謝!! 嚎啕大哭
已記錄

我的LifeType測試環境:
Win XP/Microsoft Virtual PC 2004/FC 4/Apache 2.2/PHP 5.1.2/MySQL 4.2.2/LifeType 1.1/GD 2/
hsiaosh
新手見習
*
文章: 37


檢視個人資料 個人網站
« 回覆文章 #6 於: 九月 19, 2006, 04:52:03 上午 »

Hi kitleong2006:

經過幾天的試驗後,發現只要在 /resource/{albumid}/ 中間加個 {blogid} 就可以了。
如 /{blogowner}/resource/{blogid}/{albumid}/{resourceid}$

這是我昨天剛測試出來的結果
http://hsh.tsps.tpc.edu.tw/lifetype/shiaush/post/4/16
已記錄

B2D Server 1028版+Apache:2.0.54+PHP:4.3.10+mysql:4.0.24
安裝在:/var/www/plog
lifetype v1.2.5
採用的是從阿駕那兒學來的自訂網址名稱
ajer001
版主
超級會員
*****
文章: 516


張阿駕


檢視個人資料 個人網站
« 回覆文章 #7 於: 九月 19, 2006, 05:09:55 上午 »

太棒了,因為還沒升級上去,還沒發現問題。
感謝分享!
已記錄

|| FreeBSD + Apache 2.x + PHP 5.x + MySQL 5.x ||
-- ajer001 AT twntwn.info --
nort
新手見習
*
文章: 13


檢視個人資料
« 回覆文章 #8 於: 九月 19, 2006, 07:11:39 上午 »

真是感謝您的測試結果!
我也學到了很多
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #9 於: 九月 20, 2006, 03:12:35 下午 »

用 {blogowner} 是無法判別出單一個 blogid 出來的,所以一定要加上 {blogid},或是單純使用 {blogid}

Mark
已記錄

kitleong2006
新手見習
*
文章: 8


檢視個人資料
« 回覆文章 #10 於: 九月 25, 2006, 02:46:50 下午 »

嗯... 不好意思, 這幾天因為在忙別的事, 都忘了上來看我post的這篇 害羞

blogid我後來是有加上去, 加上去後可以算是正常, 也可以算是不正, 怎麼說呢, 就是有些圖片顯示正常無誤, 但有些則還是出現叉叉的圖示, 還有就是上傳時有時會無法上傳上去, 然後php會當在那,

無法上傳或無法顯示的圖片都不是很大的檔案(1MB以下), 還有也不是中文檔名, 所以實在是很怪, 但有些上傳正常, 我目前還沒找出一個規律...

請問有人有遇過嗎?? 謝謝!!  開懷大笑
已記錄

我的LifeType測試環境:
Win XP/Microsoft Virtual PC 2004/FC 4/Apache 2.2/PHP 5.1.2/MySQL 4.2.2/LifeType 1.1/GD 2/
kitleong2006
新手見習
*
文章: 8


檢視個人資料
« 回覆文章 #11 於: 九月 25, 2006, 03:04:11 下午 »

弄來弄去都不太成,

例如可以見下面我的測試網址中:
http://blog.pt.ntu.edu.tw/kitleong/album/3

一張照片正常, 另一張就不正常, 真的很怪... orz

Thanks
已記錄

我的LifeType測試環境:
Win XP/Microsoft Virtual PC 2004/FC 4/Apache 2.2/PHP 5.1.2/MySQL 4.2.2/LifeType 1.1/GD 2/
頁: [1]
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  簡潔網址的怪問題... « 上篇主題 下篇主題 »
    前往: