歡迎光臨, 訪客. 請先 登入註冊一個帳號.
三月 29, 2024, 06:14:51 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  使用與操作  |  用数字作用户名,访问博客不存在 « 上篇主題 下篇主題 »
頁: 1 [2]
作者 主題: 用数字作用户名,访问博客不存在  (閱讀 26442 次)
jeanytu
初級會員
**
文章: 65


天天保持好心情


檢視個人資料
« 回覆文章 #15 於: 五月 17, 2006, 11:19:24 上午 »

在還沒人能幫忙解答時,我又繼續測試,
在自訂網址時,{blogowner} 如為純數字還是有問題,
目前的狀況如下:

當 RewriteBase /lifetype
○ http://網址/帳號
X http://網址/帳號/ 出現 "找不到網頁"

當 RewriteBase /lifetype
當 RewriteBase /
X http://網址/帳號 出現 "ERROR: The blog does not exist."
X http://網址/帳號/ 出現 "找不到網頁"

盼有人可以幫忙解答,謝謝!

.htaccess 的設定
====

DirectoryIndex summary.php index.html index.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 /lifetype

# Permalink to the blog entry (i.e. /plog/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. /plog/1_userfoo/archive/200401.html)
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html$ index.php?blogId=$1&Date=$2 [L,NC]

# Daily archive (i.e. /plog/1_blogfoo/archive/20040101.html)
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php?blogId=$1&Date=$2 [L,NC]

# Album (i.e. /plog/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]

# Albums (i.e. /plog/88_userfoo/albums/)
RewriteRule ^([0-9]+)_[^/]+/albums/$ index.php?op=ViewAlbum&blogId=$1&albumId=0 [L,NC]

# Category view (i.e. /plog/88_userfoo/categories/4_cat-foobar.html)
RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html$ index.php?blogId=$1&postCategoryId=$2 [L,NC]

# Category-Feeds (i.e. /plog/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. /plog/3_userfoo/feeds/atom)
RewriteRule ^([0-9]+)_[^/]+/feeds/(.*)$ rss.php?blogId=$1&profile=$2 [L,NC]

# Trackbacks (i.e. /plog/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. /plog/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. /plog/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. /plog/88_userfoo/get/this-is-a-resource-name.pdf)
RewriteRule ^([0-9]+)_[^/]+/get/(.+)$ resserver.php?blogId=$1&resource=$2 [L,NC]

# Static Pages (i.e /plog/3_userfoo/demosites)
RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId=$1&show=$2 [NC]

# A non-default blog (i.e. /plog/88_userfoo)
RewriteRule ^([0-9]+)(_[^/]+)?$ index.php?blogId=$1 [L,NC]

# Daily archive (i.e. /plog/1_userfoo/archive/20040101.html)
RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php?blogId=$1&Date=$2 [L,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>

ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
« 最後編輯時間: 五月 18, 2006, 12:32:40 下午 由 jeanytu » 已記錄

LifeType 1.1.2(直接安裝,非升級)+ AppServ 2.5.7 + Windows XP
Apache:2.2.3
PHP:5.1.6
MySQL:5.0.24a
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #16 於: 五月 17, 2006, 11:41:38 上午 »

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

注意我寫紅色的地方,這邊要一併修改才行。

Mark
« 最後編輯時間: 五月 18, 2006, 12:53:34 下午 由 markwu » 已記錄

jeanytu
初級會員
**
文章: 65


天天保持好心情


檢視個人資料
« 回覆文章 #17 於: 五月 18, 2006, 12:31:15 下午 »

Sorry!我前篇寫錯了,更正紅色部分 吐舌頭

當 RewriteBase /lifetype
○ http://網址/帳號
X http://網址/帳號/ 出現 "找不到網頁"

RewriteBase /
X http://網址/帳號 出現 "ERROR: The blog does not exist."
X http://網址/帳號/ 出現 "找不到網頁"

Mark 說要注意的地方,我試過了,不行。
就是,上下設一樣時,便完全不行,很詭異。
已記錄

LifeType 1.1.2(直接安裝,非升級)+ AppServ 2.5.7 + Windows XP
Apache:2.2.3
PHP:5.1.6
MySQL:5.0.24a
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #18 於: 五月 18, 2006, 12:54:33 下午 »

你是裝在那個目錄,如果是在  /lifetype 目錄,那麼就要上下都加上 lifetype。如果是在根目錄,那麼上下都要改成 /

Mark
已記錄

jeanytu
初級會員
**
文章: 65


天天保持好心情


檢視個人資料
« 回覆文章 #19 於: 五月 19, 2006, 03:23:32 下午 »

你是裝在那個目錄,如果是在  /lifetype 目錄,那麼就要上下都加上 lifetype。如果是在根目錄,那麼上下都要改成 /

Mark

Hi, Mark

我看過論壇中的討論,也知道一般而言上下都要設一樣的目錄,
但幾經測試就是行不通,這就是讓我十分傷腦筋的地方 疑惑

我將測試過的結果寫下,希望不會太贅言太多,但真的很詭異 吐舌頭

Jeany

====

C:\AppServ\www\lifetype\.htaccess

測試一
RewriteBase /lifetype

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

結果一
X http://網址/帳號  ==> HTTP 404 找不到網頁
X http://網址/帳號/ ==> HTTP 404 找不到網頁

====

測試二
RewriteBase /lifetype

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

結果二
○ http://網址/帳號  ==> OK 開懷大笑
X http://網址/帳號/ ==> HTTP 404 找不到網頁

====

測試三
RewriteBase /

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

結果三
X http://網址/帳號  ==> ERROR: The blog does not exist.
X http://網址/帳號/ ==> HTTP 404 找不到網頁

====

測試四
RewriteBase /

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

結果四
X http://網址/帳號  ==> ERROR: The blog does not exist.
X http://網址/帳號/ ==> HTTP 404 找不到網頁"
已記錄

LifeType 1.1.2(直接安裝,非升級)+ AppServ 2.5.7 + Windows XP
Apache:2.2.3
PHP:5.1.6
MySQL:5.0.24a
頁: 1 [2]
LifeType 中文開發論壇  |  支援  |  使用與操作  |  用数字作用户名,访问博客不存在 « 上篇主題 下篇主題 »
    前往: