Url Rewrite[1]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 btbtd 的 blog

<virtualhost *:88>
serveradmin btbtd@yahoo.com.cn
documentroot "i:/gi-2288"
servername gi.2288.org
errorlog "g:/apache/dummy-host.example.com-error_log"

rewriteengine on

# news modules
rewriterule /modules/news/topic_(.+)\.html$ /modules/news/index.php?storytopic=$1 [l]
rewriterule /modules/news/article_([0-9]+).html$ /modules/news/article.php?storyid=$1
rewriterule /modules/news/archive/([0-9]+)/([0-9]+)$ /modules/news/archive.php?year=$1&month=$1 [l]
rewriterule /modules/news/archive\.html$ /modules/news/archive.php
rewriterule /modules/news/index.html$ /modules/news/index.php

# wfdownloads modules
rewriterule /modules/wfdownloads/topic_(.+)\.html$ /modules/wfdownloads/viewcat.php?cid=$1 [l]
rewriterule /modules/wfdownloads/down_item_(.+)_file_(.+)\.html$ /modules/wfdownloads/singlefile.php?cid=$1&lid=$1
rewriterule /modules/wfdownloads/topic_o_(.+)\.html$ /modules/wfdownloads/viewcat.php?op=&cid=$1 [l]
rewriterule /modules/wfdownloads/newlist\.html$ /modules/wfdownloads/newlist.php
rewriterule /modules/wfdownloads/hit\.html$ /modules/wfdownloads/topten.php?list=hit
rewriterule /modules/wfdownloads/rate\.html$ /modules/wfdownloads/topten.php?list=rate
rewriterule /modules/wfdownloads/index.html$ /modules/wfdownloads/index.php

# mydownloads modules
rewriterule /modules/mydownloads/index.html$ /modules/mydownloads/index.php
rewriterule /modules/mydownloads/topic_(.+)\.html$ /modules/mydownloads/viewcat.php?cid=$1 [l]
rewriterule /modules/mydownloads/hit/(.+)\.html$ /modules/mydownloads/topten.php?hit=$1 [l]
rewriterule /modules/mydownloads/rate/(.+)\.html$ /modules/mydownloads/topten.php?rate=$1 [l]

# myalbum
rewriterule /modules/myalbum/index.html$ /modules/myalbum/index.php
rewriterule /modules/myalbum/topic_(.+)\.html$ /modules/myalbum/viewcat.php?cid=$1 [l]
rewriterule /modules/myalbum/topic_(.+)_photo_(.+)\.html$ /modules/myalbum/viewcat.php?num=$1&cid=$1
rewriterule /modules/myalbum/hit/(.+)\.html$ /modules/myalbum/topten.php?hit=1

# ams
rewriterule /modules/ams/index.html$ /modules/ams/index.php
rewriterule /modules/ams/article_(.+)\.html$ /modules/ams/article.php?storyid=$1
rewriterule /modules/ams/topic_(.+)\.html$ /modules/ams/index.php?storytopic=$1

#other
rewriterule /index.html$ /index.php

本文关键:Url Rewrite
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top