歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 20, 2024, 08:07:02 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  關於 request_format_mode 的使用 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 關於 request_format_mode 的使用  (閱讀 5635 次)
Royce
新手見習
*
文章: 18


檢視個人資料
« 於: 五月 03, 2006, 09:18:57 下午 »

我設置成 適宜搜索引擎 后,一開始是無法使用
後來參照其他文章,修改了
ErrorDocument 401 /tblog/error.php
ErrorDocument 403 /tblog/error.php
ErrorDocument 404 /tblog/error.php
但仍然不行~
http://sends.hqu.edu.cn/tblog/1
可以訪問,但是http://sends.hqu.edu.cn/tblog/2跟1其實都轉到同一個地方去了
而其他鏈接點擊以後都變成下載了~沒有用php解析輸出,因爲我用的是zeus,所以.htaccess上好像有些差別,不知道該怎麽辦~
已記錄

CentOS + Zeus 4.3 + Php 5.0.4 + Mysql 5 + TypeLife 1.0.4
Royce
新手見習
*
文章: 18


檢視個人資料
« 回覆文章 #1 於: 五月 06, 2006, 10:12:00 下午 »

已發現是zeus不支持apache的rewrite功能導致的~
目前我的解決方法是在zeus管理界面中的Request Rewriting部分中設置Rewrite Script
程式碼:
insensitive match URL into $ with ^(.*)/blog/post/([0-9]+)/([0-9]+)$
if matched then set URL = $1/blog/index.php?op=ViewArticle&blogId=$2&articleId=$3

insensitive match URL into $ with ^(.*)/blog/archives/([0-9]+)/([0-9]{6,8})$
if matched then set URL = $1/blog/index.php?blogId=$2&Date=$3

insensitive match URL into $ with ^(.*)/blog/album/([0-9]+)/([0-9]+)[/]*$
if matched then set URL = $1/blog/index.php?op=ViewAlbum&blogId=$2&albumId=$3

insensitive match URL into $ with ^(.*)/blog/album/([0-9]+)[/]*$
if matched then set URL = $1/blog/index.php?op=ViewAlbum&blogId=$2&albumId=0

insensitive match URL into $ with ^(.*)/blog/category/([0-9]+)/([0-9]+)[/]*$
if matched then set URL = $1/blog/index.php?op=Default&blogId=$2&postCategoryId=$3

insensitive match URL into $ with ^(.*)/blog/rss/([0-9]+)/([0-9]+)[/]*$
if matched then set URL = $1/blog/rss.php?blogId=$2&categoryId=$3

insensitive match URL into $ with ^(.*)/blog/rss/(.+)/([0-9]+)[/]*$
if matched then set URL = $1/blog/rss.php?blogId=$3&profile=$2

insensitive match URL into $ with ^(.*)/blog/trackbacks/([0-9]+)/([0-9]+)[/]*$
if matched then set URL = $1/blog/index.php?op=Trackbacks&blogId=$2&articleId=$3

insensitive match URL into $ with ^(.*)/blog/resource/([0-9]+)/([0-9]+)[/]*$
if matched then set URL = $1/blog/index.php?op=ViewResource&blogId=$2&resource=$3

insensitive match URL into $ with ^(.*)/blog/static/([0-9]+)/(.+)$
if matched then set URL = $1/blog/index.php?op=Template&blogId=$2&show=$3

insensitive match URL into $ with ^(.*)/blog/([0-9]+)[/]*$
if matched then set URL = $1/blog/index.php?blogId=$2
就可以解決zeus下的簡潔網址的問題了,但是目前還有一個問題,就是資源中心内的内容無法使用了~因爲簡潔網址下資源中心的内容格式為resource/1/2,但這樣是沒辦法知道文件名的,不知道有沒有什麽好的解決辦法,不然就只能用自定義網址,然後再改rewrite規則了~
已記錄

CentOS + Zeus 4.3 + Php 5.0.4 + Mysql 5 + TypeLife 1.0.4
頁: [1]
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  關於 request_format_mode 的使用 « 上篇主題 下篇主題 »
    前往: