歡迎您光臨本站 註冊首頁

apache別名地址重寫???

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

apache別名地址重寫???

我的web伺服器配置如下:
系統:windows7
web server:apache
資料庫:mysql
環境:php
我剛才查資料說是地址重寫rewrite有兩種方式:
一是將規則放到.htaccess中,二是在主配置文件httpd.conf中寫
我現在要在httpd.conf中寫,不知道放到哪裡,用不用寫RewriteBase,
誰能寫一個在httpd.conf中的 ,能用的。
非常感謝!!
《解決方案》

<IfModule mod_Rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-(+)-(+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-(+)-(+)-(+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
</IfModule>
《解決方案》

:em03:頂~

[火星人 ] apache別名地址重寫???已經有352次圍觀

http://coctec.com/docs/service/show-post-18456.html