大家都知道Apache里面的Rewrite规则是一件很蛋疼的事情,有时候只是想做一个伪静态而已,不想去研究那些复杂的规则,可官方给的规则又常常出错,出了问题我们就要调试一下,看看提交的参数被映射到了哪里。在网上搜了一下全都是说在apache里面加RewriteLog,而且中文的介绍完全没有。
 
 
在旧的Apache的httpd.conf里面是有这样的参数的: ? 1
2 RewriteLog "/myfolder/mylogfile.log"
RewriteLogLevel 3 但是在新版本的Apache中,已经取消了RewriteLog这个参数,如果你加上这个参数只会使你的Apache无法启动!新版本的Apache已经把Rewrite模块的日志也写到了Apache的error.log中,只需要我们制定一下输出的log的级别和trace的深度就好了,例如 ? 1 LogLevel alert rewrite:trace3 LogLevel的级别和深度选择如下表: LevelDescriptionExample emerg
Emergencies – system is unusable.
“Child cannot open lock file. Exiting” alert
Action must be taken immediately.
“getpwuid: couldn’t determine user name from uid” crit
Critical Conditions.
“socket: Failed to get a socket, exiting child” error
Error conditions.
“Premature end of script headers” warn
Warning conditions.
“child process 1234 did not exit, sending another SIGHUP” notice
Normal but significant condition.
“httpd: caught SIGBUS, attempting to dump core in …” info
Informational.
“Server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers)…” debug
Debug-level messages
“Opening config file …” trace1
Trace messages
“proxy: FTP: control connection complete” trace2
Trace messages
“proxy: CONNECT: sending the CONNECT request to the remote proxy” trace3
Trace messages
“openssl: Handshake: start” trace4
Trace messages
“read from buffered SSL brigade, mode 0, 17 bytes” trace5
Trace messages
“map lookup FAILED: map=rewritemap key=keyname” trace6
Trace messages
“cache lookup FAILED, forcing new map lookup” trace7
Trace messages, dumping large amounts of data
“| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |” trace8
Trace messages, dumping large amounts of data
“| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |” 因此我们假如需要调试某个虚拟主机的伪静态的话,我们可以在给虚拟主机的<VirtualHost>配置项或者.htaccess里面加入如下的一段配置: ? 1
2
3 <IfModule mod_rewrite.c>
LogLevel debug rewrite:trace3
</IfModule> 然后访问一下,error.log里面就会有具体的信息了,可以看到你提交的URL被映射到了哪个文件,进行有针对性的调整。 tail -f error_log|fgrep '[rewrite:' 
[Fri Mar  ::02.071407 ] [rewrite:trace3] [pid :tid ] mod_rewrite.c(): [client 10.9.113.226:] 10.9.113.226 - - [10.12.8.242/sid#13d8b88][rid#7f182400e9d0/initial] applying pattern '^/news/interview/([0-9]+)$' to uri '/cmdn/res/static/wiki/images/channel.png', referer: http://10.12.8.242:8002/wk?devguide
[Fri Mar ::02.071431 ] [rewrite:trace3] [pid :tid ] mod_rewrite.c(): [client 10.9.113.226:] 10.9.113.226 - - [10.12.8.242/sid#13d8b88][rid#7f1818004980/initial] applying pattern '^/terminal/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\\.html/([0-9]+)$' to uri '/cmdn/res/static/wiki/images/pub.png', referer: http://10.12.8.242:8002/wk?devguid
[Fri Mar ::02.071439 ] [rewrite:trace3] [pid :tid ] mod_rewrite.c(): [client 10.9.113.226:] 10.9.113.226 - - [10.12.8.242/sid#13d8b88][rid#7f182400e9d0/initial] applying pattern '^/news/MMnews/([0-9]+)$' to uri '/cmdn/res/static/wiki/images/channel.png', referer: http://10.12.8.242:8002/wk?devguide
[Fri Mar ::02.071459 ] [rewrite:trace3] [pid :tid ] mod_rewrite.c(): [client 10.9.113.226:] 10.9.113.226 - - [10.12.8.242/sid#13d8b88][rid#7f1818004980/initial] applying pattern '^/terminal/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)\\.html/([0-9]+)$' to uri '/cmdn/res/static/wiki/images/pub.png', referer: http://10.12.8.242:8002/wk?devguide

附官方说明文档:

http://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging

重写规则可以从.htaccess载入引用,也可以包含到http.conf,如Include E:/html/cmdn/cmdn/httpd-rewrite.conf载入

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
 RewriteRule .* - [F]
 #RewriteLog logs/rewrite.log
 #RewriteCond %{HTTP_HOST}   ^dev\.(chinamobile|mmarket)\.com [NC]
 #RewriteRule ^/(.*)         http://dev.10086.cn/$1 [L,R]
 #RewriteRule   ^/(.*)$  /cmdn/supesite/notice2.html
 RewriteRule   ^/$  /cmdn/supesite/index2.php
 #RewriteRule   ^/buluo/(.*)$  /cmdn/tieba/$1
 RewriteRule   ^/buluo/(.*)$  http://www.baidu.com
 
 #----------��������------------
 #RewriteRule   ^/news/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html$ /cmdn/supesite/newdev.news.php?id=$1&type=$2
 #RewriteRule  ^/news/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\html$ /cmdn/supesite/newdev.news.php?type=tagsearch&tag=$tag        
 #RewriteRule   ^/news/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.news.php?id=$1&type=$2&operation=$3
 #RewriteRule  ^/news/search/([a-zA-Z0-9]*)\.html$  /cmdn/supesite/newdev.news_search.php?flag=$1
 #RewriteRule  ^/news/search\.html$  /cmdn/supesite/newdev.news_search.php
 #RewriteRule   ^/mmstation\.html$  /cmdn/supesite/newdev.mmstation.php
 #RewriteRule   ^/mmstation/([a-zA-Z0-9]+)\.html$  /cmdn/supesite/newdev.mmstation.php?operation=$1
 #RewriteRule   ^/mmstation/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$  /cmdn/supesite/newdev.mmstation.php?operation=$1&subjectId=$2&subjectType=$3
 
 #RewriteRule   ^/news/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html/([0-9]+)$ /cmdn/supesite/newdev.news.php?id=$1&type=$2&page=$3
 #RewriteRule   ^/news/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html/([0-9]+)$ /cmdn/supesite/newdev.news.php?id=$1&type=$2&operation=$3&page=$4
 
 #----------������Ѷ------------
 RewriteRule   ^/news$ /action-channel-name-news
 RewriteRule   ^/news/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html(/[a-zA-Z0-9]+)?$ /cmdn/supesite/newdev.info_detail.php?id=$2&type=detail&page=$3
 RewriteRule   ^/news/technologyproduct$ /cmdn/supesite/newdev.info_dynamic.php?id=1&operation=one
 RewriteRule   ^/news/industrynews$ /cmdn/supesite/newdev.info_dynamic.php?id=2&operation=one     
 RewriteRule   ^/news/peopletracking$ /cmdn/supesite/newdev.info_dynamic.php?id=3&operation=one     
 RewriteRule   ^/news/observation$ /cmdn/supesite/newdev.info_dynamic.php?id=4&operation=one 
 RewriteRule   ^/news/interview$ /cmdn/supesite/newdev.info_dynamic.php?id=5&operation=one
 RewriteRule   ^/news/MMnews$ /cmdn/supesite/newdev.info_dynamic.php?id=6&operation=one
 RewriteRule   ^/news/rollingnews$ /cmdn/supesite/newdev.info_dynamic.php?id=scroll&operation=one
 RewriteRule   ^/news/deliverynews$ /cmdn/supesite/newdev.informationdelivery.php
 RewriteRule   ^/news/alltheme$ /cmdn/supesite/newdev.info_theme.php?operation=index&oneid=4
 
 RewriteRule   ^/news/technologyproduct/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=1&operation=one&page=$1
 RewriteRule   ^/news/industrynews/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=2&operation=one&page=$1     
 RewriteRule   ^/news/peopletracking/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=3&operation=one&page=$1     
 RewriteRule   ^/news/observation/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=4&operation=one&page=$1 
 RewriteRule   ^/news/interview/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=5&operation=one&page=$1
 RewriteRule   ^/news/MMnews/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=6&operation=one&page=$1
 RewriteRule   ^/news/rollingnews/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=scroll&operation=one&page=$1

RewriteRule   ^/info_detail/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html(/[a-zA-Z0-9]+)?$ /cmdn/supesite/newdev.info_detail.php?id=$1&type=$2&page=$3
 RewriteRule   ^/info_delivery/send\.html$ /cmdn/supesite/newdev.informationdelivery.php
 RewriteRule   ^/info_dynamic/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html$ /cmdn/supesite/newdev.info_dynamic.php?id=$1&operation=$2
 RewriteRule   ^/info_dynamic/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?id=$1&operation=$2&page=$3
 RewriteRule   ^/info/search\.html$ /cmdn/supesite/newdev.info_search.php
 RewriteRule   ^/info/usersearch\.html$ /cmdn/supesite/newdev.info_usersearch.php
 RewriteRule   ^/info_theme/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html$ /cmdn/supesite/newdev.info_theme.php?operation=$2&oneid=$1

#------------�ն���Ϣ��-------
 RewriteRule   ^/terminal/([a-zA-Z0-9]+)\.html$ /cmdn/supesite/newdev.terminal.php?operation=$1 
 RewriteRule   ^/terminal/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.terminal.php?operation=$1&id=$2&brandid=$3
 RewriteRule   ^/terminal/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.terminal.php?operation=$1&brandid=$2
 
 RewriteRule   ^/terminal/([a-zA-Z0-9]+)\.html/([0-9]+)$ /cmdn/supesite/newdev.terminal.php?operation=$1&page=$2
 RewriteRule   ^/terminal/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html/([0-9]+)$ /cmdn/supesite/newdev.terminal.php?operation=$1&id=$2&brandid=$3&page=$4
 RewriteRule   ^/terminal/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)\.html/([0-9]+)$ /cmdn/supesite/newdev.terminal.php?operation=$1&brandid=$2&page=$3
 
 
 #------------MMarket����--------
  RewriteRule    ^/market/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)\.html$   /cmdn/supesite/newdev.market.php?operation=$1&faqid=$2                                               
 RewriteRule    ^/market/([a-zA-Z0-9]*)\.html$   /cmdn/supesite/newdev.market.php?operation=$1
 #------------��ҳ-------------
 RewriteRule    ^/loginout\.html$   /cmdn/supesite/newdev.loginout.php
 RewriteRule    ^/loginout/([a-zA-Z0-9]*[.]*[/]*[\]*[?]*)\.html$       /cmdn/supesite/newdev.loginout.php?refererUrl=$1
 RewriteRule  ^/loginout/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.loginout.php?from=$1
 RewriteRule   ^/controlpanel/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$  /cmdn/supesite/newdev.controlpanel.php?usertype=$1&operation=$2 
 RewriteRule   ^/reg_menu/([a-zA-Z0-9]*)\.html$  /cmdn/supesite/newdev.reg_menu.php?opt=$1
 RewriteRule   ^/index.html$  /cmdn/supesite/index.php
 RewriteRule   ^/interview/([a-zA-Z0-9]+)\.html$  /cmdn/supesite/newdev.interview.php?operation=$1
 RewriteRule   ^/interview/([a-zA-Z0-9]+)\.html/([0-9]+)$  /cmdn/supesite/newdev.interview.php?operation=$1&page=$2
 
 RewriteRule   ^/associatedetail/([a-zA-Z0-9]+)\.html$  /cmdn/supesite/newdev.associatedetail.php?id=$1
 RewriteRule   ^/mobile_avatar/([a-zA-Z0-9]+)\.html$  /cmdn/supesite/mobile_avatar.php?uid=$1
 RewriteRule   ^/toolss/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.tool.php?type=$1&id=$2&attachid=$3
 RewriteRule   ^/cmdn/bbs/index\.html$ /cmdn/bbs/index.php
 #------------------�ײ�----------------------------------
 RewriteRule   ^/slideupAdv/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$   /cmdn/supesite/newdev.slideupAdv.php?operation=$1&advid=$2
  RewriteRule     ^/help/([a-zA-Z0-9]*)\.html$     /cmdn/supesite/newdev.help.php?operation=$1
 RewriteRule     ^/help\.html$             /cmdn/supesite/newdev.help.php
 RewriteRule     ^/help/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$     /cmdn/supesite/newdev.help.php?operation=$2&typeid=$1
 RewriteRule     ^/foot/([a-zA-Z0-9]*)\.html$     /cmdn/supesite/newdev.foot.php?action=$1
 #-----------------��������------------------------------
 RewriteRule     ^/help/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html/([0-9]+)$      /cmdn/supesite/newdev.help.php?operation=$2&typeid=$1&page=$3
 RewriteRule     ^/help/([a-zA-Z0-9]*)\.html/([0-9]+)$     /cmdn/supesite/newdev.help.php?operation=$1&page=$2
 RewriteRule     ^/sercahhelp/sercah\.html$      /cmdn/supesite/newdev.help_sercah.php
 #------------�����ĵ�����Ŀ¼-------------
 RewriteRule   ^/factory/([a-zA-Z0-9]+)\.html$ /cmdn/supesite/newdev.factory.php?action=$1
 
 #------------�����ĵ�-------------
 RewriteRule   ^/action/channel/name/([a-zA-Z]+)\.html$ /cmdn/supesite/index.php?action-channel-name-$1
 RewriteRule   ^/factory/([a-zA-Z0-9-_]*)\.html$ /cmdn/supesite/newdev.factory.php?action=$1
 RewriteRule   ^/tool/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.tool.php?type=$1&typeid=$2&operation=$3&mode=$4
 RewriteRule   ^/tool/([a-zA-Z0-9]*)/([a-zA-Z0-9]+)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.tool.php?type=$1&typeid=$2&operation=$3
 RewriteRule   ^/tools/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.tool.php?type=$1&id=$2&operation=$3
 RewriteRule   ^/tool/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.tool.php?type=$1&id=$2
 RewriteRule   ^/tools/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.tool.php?type=$1&typeid=$2 
 RewriteRule   ^/reg_menu/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.reg_menu.php?opt==$1
 RewriteRule   ^/loginout\.html$ /cmdn/supesite/newdev.loginout.php
 RewriteRule   ^/loginout/([a-zA-Z0-9]*[.]*[/]*[\]*[?]*)\.html$ /cmdn/supesite/newdev.factory.php?refererUrl=$1
 RewriteRule   ^/tool_search\.html$ /cmdn/supesite/newdev.tool_search.php
 RewriteRule   ^/tool_search/([a-zA-Z0-9-_%+]*)\.html$ /cmdn/supesite/newdev.tool_search.php?searchword=$1 
 RewriteRule   ^/news_search/([a-zA-Z0-9-_%+]*)\.html$ /cmdn/supesite/newdev.news_search.php?searchword=$1
 RewriteRule   ^/news_search/two/([a-zA-Z0-9-_%+]*)\.html$ /cmdn/supesite/newdev.news_search.php?searchtype=$1
 RewriteRule   ^/news/search\.html$ /cmdn/supesite/newdev.news_search.php
 RewriteRule   ^/news_search\.html$ /cmdn/supesite/newdev.news_search.php 
 RewriteRule   ^/cmdn/bbs/([a-zA-Z0-9]*)\.html$ /cmdn/bbs/forumdisplay.php?fid=$1
 RewriteRule   ^/cmdn/bbs/([a-zA-Z0-9]*)/tid\.html$ /cmdn/bbs/viewthread.php?tid=$2 
 RewriteRule   ^/news/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.news.php?id=$1&type=$2&operation=$3
 RewriteRule   ^/news/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.news.php?id=$1&type=$2
 #RewriteRule   ^/([a-zA-Z0-9_+-]*)\.([a-zA-Z]*)$ /cmdn/supesite/attachments/files/$1.$2
 RewriteRule   ^/images/([a-zA-Z0-9_+-]*)\.([a-zA-Z]*)$ /cmdn/supesite/templates/mobile/images/$1.$2
 #RewriteRule   ^/([a-zA-Z0-9]*)/([a-zA-Z0-9_+-]*)\.([a-zA-Z]*)$ /cmdn/supesite/attachments/resource_attachments/$1/$2.$3
 
 RewriteRule   ^/tool/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html/([0-9]+)$ /cmdn/supesite/newdev.tool.php?type=$1&typeid=$2&operation=$3&page=$4
 RewriteRule   ^/tool/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html/([0-9]+)$ /cmdn/supesite/newdev.tool.php?type=$1&id=$2&page=$3
 RewriteRule   ^/tools/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html/([0-9]+)$ /cmdn/supesite/newdev.tool.php?type=$1&typeid=$2&page=$3
 
 #------------����Ƶ������Ŀ¼����ҳ-------
 RewriteRule   ^/action-channel-name-([a-zA-Z]+)$ /cmdn/supesite/index.php?action-channel-name-$1 
 RewriteRule   ^/playertesting/([a-zA-Z0-9]*)\.html$ /cmdn/supesite/newdev.playertesting.php?operation=$1
 
 #------------��̳url��д-----------------
 RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
 RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
 RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
 #RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
 RewriteRule ^(.*)/space-(username|ecode)-(.+)\.html$ $1/space.php?$2=$3
 RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
 
 #------------Ӧ�ÿ���ר��url��д-----------
 RewriteRule ^/symbian$ /cmdn/supesite/newdev_Development.php?type=symbian
 RewriteRule ^/javame$ /cmdn/supesite/newdev_Development.php?type=javame
 RewriteRule ^/wm$ /cmdn/supesite/newdev_Development.php?type=wm
 RewriteRule ^/android$ /cmdn/supesite/newdev_Development.php?type=android

#------------����URL��д-----------------
        #RewriteRule ^/blog$ /cmdn/supesite/index.php
        #RewriteRule ^/blog(.*)$ /cmdn/supesite/index.php

#------------����URL��д-----------------
 #RewriteRule ^/mmfactory(\/)?$ /upload/fhq/index.html
# RewriteRule ^/mmfactory(\/)?$ /dev_mulu_sc_yunying/fhq/index.html
#        RewriteRule   ^/brandshop/(.*)$  http://10.101.5.196:9020/brandshop/$1 [P]
 
 #------------mmpk URL��д-----------------
 RewriteRule ^/pk(.*)$ /cmdn/supesite/game/mmpk$1

#--------------�ʿ�URLֿ------------------------------
        RewriteRule ^/xinshou$ /cmdn/supesite/index.php?action-channel-name-novice
        RewriteRule ^/xinshou/download$ /cmdn/supesite/newdev.xinshoudownload.php
          #------------mm chuangye dashai pingshen
        #RewriteRule ^/mm2010/pingshen$ /upload/subject/201103/cyjhps/index.html
        #RewriteRule ^/mm2010(.*)$ /dev_mulu_sc_yunying/subject/201103/cyjhps/index.html
        #RewriteRule ^/mm2010/pingshen$ /dev_mulu_sc_yunying/subject/201103/cyjhps/index.html

#RewriteRule ^/yccs1/meat.htm?from=cszx1$ /upload/subject/201006/yccs/meat.html?from=cszx1
 RewriteRule ^/yccs1/(.*) http://dev.10086.cn/upload/subject/201006/dev_mulu_sc_yunying/$1 [L,R]
 
 
 RewriteRule ^/cgdc/?$ /cmdn/supesite/game/dev2011/index.php
        RewriteRule ^/ude/?$ /dev_mulu_sc_yunying/ude/index.html
 #--channel-----#
 RewriteRule ^/reg/([a-zA-Z]+)/([0-9]+)\.html$ /cmdn/bbs/chanel.php?t=$2&qdbs=$1
 #RewriteRule ^/rts/?$ /cmdn/supesite/newdev.iframe_interface_inline.php?from=rts
 #RewriteRule ^/rts/?$ /cmdn/supesite/rts/index.php
 #--iap--#
 RewriteRule ^/iap/?$ /cmdn/supesite/iap/index.php
 #--mmstar--#
 RewriteRule ^/mmstar/?$ /cmdn/salon/game/mmstar/index.php
 #--miaic--#
 RewriteRule ^/maic/?$ /cmdn/supesite/game/mmsina/index.php
 #---------en cmdn---------
 RewriteRule ^/en/?$ /en/supesite/index.php
        RewriteRule ^/blog$ /cmdn/supesite/index.php
 #RewriteRule ^/cgdc2012$ /cmdn/salon/dev2012/index.php
 #RewriteRule ^/fengtou(\/)?$ /upload/fengtou/index.html
 RewriteRule ^/fengtou(\/)?$ /dev_mulu_sc_yunying/fengtou/index.html
#RewriteRule ^/mm2011/ps(.*)$ /upload/supesite/cyjh2011/ps/index.html
#RewriteRule ^/mm2011/ps(.*)$ /dev_mulu_sc_yunying/supesite/cyjh2011/ps/index.html  
RewriteRule ^/cgdc2012/?$ /cmdn/salon/dev2012/index.php
    #RewriteRule ^/cgdc2012live$ /cmdn/salon/dev2012/index.php?p=cgdc2012live
RewriteRule ^/app$ /cmdn/supesite/jump/fuhua.php
#RewriteRule ^/mmfactory(\/)?$ /dev_mulu_sc_yunying/fhq/index.html
RewriteRule ^/mmfactory/?$    http://10.1.3.222:8002/app
#RewriteRule ^/2013/?$ /cmdn/salon/game/dev2013/index.php

RewriteCond %{REQUEST_URI}  ^/server/shequ/(.*)
RewriteRule ^/server/shequ/(.*) http://10.1.3.219:22630/server/shequ/$1?%{QUERY_STRING} [P,L]

RewriteCond %{REQUEST_URI}  ^/server/
RewriteRule ^/server/(.*) http://10.1.3.219:22630/server/$1?%{QUERY_STRING} [P,L]

RewriteCond %{REQUEST_URI}  ^/server/app/encode/(.*)
RewriteRule ^/server/app/encode/(.*) http://10.1.3.219:22630/server/app/encode/$1?%{QUERY_STRING} [P,L]

RewriteCond %{REQUEST_URI}  ^/admin/shequ/(.*)
RewriteRule ^/admin/shequ/(.*) http://10.1.3.219:22630/admin/shequ/$1?%{QUERY_STRING} [P,L]

RewriteCond %{REQUEST_URI}  ^/admin/(.*).gif$
RewriteRule ^/admin/(.*).gif http://10.1.3.219:22630/admin/$1.gif  [P,L]

RewriteCond %{REQUEST_URI}  ^/admin/(.*).css$
RewriteRule ^/admin/(.*).css http://10.1.3.219:22630/admin/$1.css  [P,L]

RewriteCond %{REQUEST_URI}  ^/admin/(.*).js$
RewriteRule ^/admin/(.*).js http://10.1.3.219:22630/admin/$1.js  [P,L]

RewriteCond %{REQUEST_URI}  ^/admin/(.*).png$
RewriteRule ^/admin/(.*).png http://10.1.3.219:22630/admin/$1.png  [P,L]

RewriteCond %{REQUEST_URI}  ^/admin/common/Setting.jsp$
RewriteRule ^/admin/common/Setting.jsp http://10.1.3.219:22630/admin/common/Setting.jsp  [P,L]
RewriteRule ^/channel?(.*)$ /cmdn/salon/game/operate/index.php$1

#--���Ͽ�--#
RewriteRule ^/wiki?(.*)$ /cmdn/salon/game/open2/index.php$1
RewriteRule ^/oldwk?(.*)$ /cmdn/salon/game/open/index.php$1
RewriteRule ^/wk?(.*)$ /cmdn/salon/game/open2/index.php$1
#--��ҵ�ƻ�--#
#RewriteRule ^/yecp/$ /cmdn/salon/index.php
#RewriteRule ^/yecp/college$ /cmdn/salon/index.php?p=busiplan&ac=college
#RewriteRule ^/yecp/cmdc$ /cmdn/salon/index.php?p=salonlist
#RewriteCond %{REQUEST_URI} ^/yecp/match(.*)
#RewriteRule ^/yecp/match(.*) http://localhost:8002/cmdn/supesite/game/mm2013/$1?%{QUERY_STRING} [P,L]
#RewriteRule ^/yecp/match(.*) /cmdn/supesite/game/mm2013/$1?%{QUERY_STRING} [P,L]
#RewriteRule ^/yecp/task$ /cmdn/salon/game/match/index.php
#RewriteRule ^/yecp/job$ /cmdn/salon/index.php?p=jobs
#RewriteRule ^/yecp/cooperation$ /cmdn/salon/index.php?p=cooperation
#RewriteRule ^/yecp/promote$ /cmdn/salon/index.php?p=promote
#------------��ҵ�ƻ�URL��д-----------------
RewriteRule ^/cmdc/$ /cmdn/salon/index.php
RewriteRule ^/yecp/$ /cyjh/index.php
RewriteRule ^/yecp/college$ /cmdn/salon/index.php?p=busiplan&ac=college
RewriteRule ^/yecp/cmdc$ /cmdn/salon/index.php?p=salonlist
RewriteCond %{REQUEST_URI} ^/yecp/match(.*)
RewriteRule ^/yecp/match(.*) /cmdn/supesite/game/mm2013/$1?%{QUERY_STRING} [P,L]
RewriteRule ^/yecp/task$ /cmdn/salon/game/match/index.php
RewriteRule ^/yecp/job$ /cmdn/salon/index.php?p=jobs
RewriteRule ^/yecp/cooperation$ /cmdn/salon/index.php?p=cooperation
RewriteRule ^/yecp/promote$ /cmdn/salon/index.php?p=promote 
RewriteRule ^/mm2013(.*) /cmdn/supesite/game/mm2013/$1?%{QUERY_STRING} [P,L]
RewriteCond %{REQUEST_URI} ^/mm2013
 RewriteRule ^/mm2013/  yecp/match [L,R]
 RewriteCond %{REQUEST_URI} ^/mm2013
 RewriteRule ^/mm2013  yecp/match [L,R]

#RewriteRule ^/2014/?$ /cmdn/salon/game/dev2014/index.php
RewriteRule ^/fusion/?$ /cmdn/salon/game/fusion/index.php
RewriteRule ^/match(.*) http://localhost:8002/cmdn/supesite/game/mm2013/$1?%{QUERY_STRING} [P,L]
RewriteRule ^/incubate(.*) /cyjh/index.php?p=incubate&$1 [QSA]

RewriteRule    ^/info/ggsearch\.html$ /cmdn/supesite/newdev.info_dynamic_search.php
#--ll-lm--#
 RewriteRule ^/ll-lm/?$ /cmdn/supesite/ll-lm/index.php

RewriteRule ^/ipp(.*) /cmdn/salon/game/ip/index.php?%{QUERY_STRING} [PT]
#RewriteRule    ^/cmdn/salon/game/ip(.*)  /ipp?%{QUERY_STRING} [R]

RewriteRule ^/2014(.*)$ /cmdn/supesite/templates/mobile/error500.html.php
 RewriteRule ^/2012(.*)$ /cmdn/supesite/templates/mobile/error500.html.php
 RewriteRule ^/2013(.*)$ /cmdn/supesite/templates/mobile/error500.html.php
 RewriteRule ^/maic(.*)$ /cmdn/supesite/templates/mobile/error500.html.php
 RewriteRule ^/mm2011/ps(.*)$ /cmdn/supesite/templates/mobile/error500.html.php
 RewriteRule ^/mmmm2012/ps(.*)$ /cmdn/supesite/templates/mobile/error500.html.php
 RewriteRule ^/mm2010/pingshen$ /cmdn/supesite/templates/mobile/error500.html.php
 
# RewriteRule ^/2015pingshenhui/?$ /cmdn/salon/game/ps2015/index.php
 RewriteRule ^/2015pingshenhui(.*) /cmdn/salon/game/ps2015/index.php?%{QUERY_STRING} [PT]
    RewriteRule    ^/cmdn/salon/game/ps2015/index.php(.*)  /2015pingshenhui?%{QUERY_STRING} [R]
RewriteRule ^/servicerob/(.*)$ /cmdn/wiki/servicerob/web/index.php?r=service/$1

RewriteRule ^/maker2017/?$ /cmdn/wiki/servicerob/web/index.php?r=activity/mls/index [P,L]
RewriteRule ^/maker2017/([a-zA-Z0-9]*)\.html$ /cmdn/wiki/servicerob/web/index.php?r=activity/mls/$1 [P,L]
RewriteRule ^/maker2017/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/wiki/servicerob/web/index.php?r=activity/mls/$1&num=$2 [P,L]
RewriteRule ^/cj2017/?$ /cmdn/wiki/servicerob/web/index.php?r=activity/activity/cj&%{QUERY_STRING} [P,L] 
RewriteRule ^/cj2017/([a-zA-Z0-9]*)?$ /cmdn/wiki/servicerob/web/index.php?r=activity/activity/$1
RewriteRule ^/maker2017Lot/([a-zA-Z0-9]*)?$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlslottery/$1
RewriteRule ^/maker2017Lot/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlslottery/$1&mb=$2 [P,L]
RewriteRule ^/cmph5/apply?$ /cmdn/wiki/servicerob/web/index.php?r=member/apply
RewriteRule ^/cmph5(.*)?$ /cmdn/wiki/servicerob/web/index.php?r=member/reg
RewriteRule ^/signUp$ http://10.12.8.242:8002/signUp/
RewriteRule ^/cmpast$ http://10.12.8.242:8002 [L]
RewriteRule ^/mlsgame/?$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlsgame/index&%{QUERY_STRING}
RewriteRule ^/mlsgame/([a-zA-Z0-9]*)?$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlsgame/$1&%{QUERY_STRING}
RewriteRule ^/modules/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/?$ /cmdn/wiki/servicerob/web/index.php?r=$1/$2&%{QUERY_STRING}
RewriteRule ^/modules/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/?$ /cmdn/wiki/servicerob/web/index.php?r=$1/$2/$3&%{QUERY_STRING}
RewriteRule ^/modules/?$ /cmdn/wiki/servicerob/web/index.php?%{QUERY_STRING}
RewriteRule ^/joinus/zjh/?$ /cmdn/wiki/servicerob/web/index.php?r=activity/joinus/from&%{QUERY_STRING}
RewriteRule   ^/info_dynamic_json/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html/([0-9]+)$ /cmdn/supesite/newdev.info_dynamic.php?type=json&id=$1&operation=$2&page=$3
RewriteRule ^/act/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/?$ /cmdn/wiki/servicerob/web/index.php?r=activity/product/index&zname=$1&case=$2&%{QUERY_STRING}
RewriteRule ^/maker/?$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlsnew/index [P,L]
RewriteRule ^/maker/([a-zA-Z0-9]*)\.html$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlsnew/$1 [P,L]
RewriteRule ^/maker/match/([a-zA-Z0-9]*)\.html$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlsmatch/$1&%{QUERY_STRING} [P,L]
RewriteRule ^/maker/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html$ /cmdn/wiki/servicerob/web/index.php?r=activity/mlsnew/$1&num=$2 [P,L]
</IfModule>

详解调试Apache的mod_rewrite模块的更多相关文章

  1. windows开启Apache的mod_rewrite模块

    windows下安装apache默认是没有开启mod_rewrite模块的,启用也很简单,修改apache配置文件httpd.conf,查找rewrite_module, 找到这行:#LoadModu ...

  2. Linux apache 添加 mod_rewrite模块

    apache已安装完毕,手动添加mod_rewrite模块  #find . -name mod_rewrite.c //在apache的源码安装目录中寻找mod_rewrite.c文件 #cd mo ...

  3. Debian/Ubuntu下安装Apache的Mod_Rewrite模块的步骤

    启用 Mod_rewrite 模块:sudo a2enmod rewrite 另外,也可以通过将 /etc/apache2/mods-available/rewrite.load 连接到 /etc/a ...

  4. Debian/Ubuntu下安装Apache的Mod_Rewrite模块的步骤分享

    启用 Mod_rewrite 模块:sudo a2enmod rewrite 另外,也可以通过将 /etc/apache2/mods-available/rewrite.load 连接到 /etc/a ...

  5. 代理服务器 详解 Apache与Nginx的比较与分析

    正向代理:是一个位于客户端和原始服务器(origin server)之间的服务器,为了从原始服务器取得内容,客户端向代理发送一个请求并指定目标(原始服务器),然后代理向原始服务器转交请求并将获得的内容 ...

  6. c#的dllimport使用方法详解,调试找不到dll的方法

    DllImport会按照顺序自动去寻找的地方: 1.exe所在目录 2.System32目录 3.环境变量目录所以只需要你把引用的DLL 拷贝到这三个目录下 就可以不用写路径了 或者可以这样serve ...

  7. Orchard详解--第八篇 拓展模块及引用的预处理

    从上一篇可以看出Orchard在处理拓展模块时主要有两个组件,一个是Folder另一个是Loader,前者用于搜索后者用于加载. 其中Folder一共有三个:Module Folder.Core Fo ...

  8. Orchard详解--第七篇 拓展模块(译)

    Orchard作为一个组件化的CMS,它能够在运行时加载任意模块. Orchard和其它ASP.NET MVC应用一样,支持通过Visual Studio来加载已经编译为程序集的模块,且它还提供了自定 ...

  9. 步骤详解安装Apache web服务器

    1.在上右键è安装 安装后apache web服务器自动启动. 在右下角出现. Apache安装之后有一个默认的网站目录 在浏览器上通过网站就可以访问到该目录下的文件. 2.测试 在浏览器输上请求lo ...

随机推荐

  1. js监测滚动条到达最底边

    scroll : function(){ $(window).scroll(function () { var scrollTop = $(this).scrollTop(); var scrollH ...

  2. 下载并安装Prism5.0库 Download and Setup Prism Library 5.0 for WPF(英汉对照版)

    Learn what’s included in Prism 5.0 including the documentation, WPF code samples, and libraries. Add ...

  3. shell与正则表达式

    作业一:整理正则表达式博客 已整理完.作业二:grep作业(正则表达式及字符处理) 目标文件/etc/passwd,使用grep命令或egrep 1.显示出所有含有root的行:[root@bogon ...

  4. Android中UI线程与后台线程交互设计的6种方法

    在android的设计思想中,为了确保用户顺滑的操作体验.一些耗时的任务不能够在UI线程中运行,像访问网络就属于这类任务.因此我们必须要重新开启 一个后台线程运行这些任务.然而,往往这些任务最终又会直 ...

  5. Arcgis for javascript不同的状态下自定义鼠标样式

    俗话说:爱美之心,人皆有之.是的,没错,即使我只是一个做地图的,我也希望自己的地图看起来好看一点.在本文,给大家讲讲在Arcgis for javascript下如何自定义鼠标样式. 首先,说几个状态 ...

  6. Android 进阶9:进程通信之 AIDL 解析

    读完本文你将了解: AIDL AIDL 生成文件分析 Stub Proxy AIDL 生成的内容小结 AIDL 的使用回顾 服务端 客户端 小结 手动写个 Binder 首先是定义跨进程接口实现 II ...

  7. let防止变量声明提前

    let可以解决原来js中,一个函数中变量混乱的问题,因为以前var 定义的变量时, {}是不能限制变量作用域的. "use strict"; +function(){ var t= ...

  8. 人生苦短之我用Python篇(深浅拷贝、常用模块、内置函数)

    深浅拷贝 有时候,尤其是当你在处理可变对象时,你可能想要复制一个对象,然后对其做出一些改变而不希望影响原来的对象.这就是Python的copy所发挥作用的地方. 定义了当对你的类的实例调用copy.c ...

  9. 【转载】获取MAC地址方法大全

    From:http://blog.csdn.net/han2814675/article/details/6223617 Windows平台下用C++代码取得机器的MAC地址并不是一件简单直接的事情. ...

  10. InnoSetup使用笔记

    今天用InnoSetup做安装包时,因为要装的驱动区分32位.64位,64位系统中要安装32位+64位驱动. 想在脚本中进行判断.折腾一阵,终于搞定: 参考了:http://379910987.blo ...