大家都知道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>

最新文章

  1. 【Win10应用开发】自适应磁贴中的分组
  2. Struts2入门(一)——环境搭建和简单例子(Struts2 2.5.2版本)
  3. Python下RSA加密/解密, 签名/验证
  4. Unity3D ogg下载并播放
  5. 【转】ETL增量抽取——通过时间戳方式实现
  6. java设计模式设计模式
  7. mysql case then使用
  8. paip java.net.SocketException No buffer space available的解决办法及总结
  9. jquery autocomplete 简单实用例子
  10. Trainning Guide的代码
  11. 探索Microsoft.NET目录
  12. Bash For Loop Examples for Your Linux Shell Scripting--ref
  13. ie7下div覆盖在iframe上方,ie8就不行,怎么解决
  14. C# 利用反射动态创建对象——带参数的构造函数和String类型
  15. int与string的相互转换
  16. 关于JS递归函数细化认识及实用实例
  17. 前端生成验证码图片utils
  18. LVS三种模式分析(超详细)
  19. TCP/IP详解 卷1 第二十章 TCP的成块数据流
  20. Docker_部署jenkins(dockerfile实现)

热门文章

  1. uva 10305 拓扑排序裸题
  2. Ceph中的容量计算与管理
  3. [eShopOnContainers 学习系列] - 02 - vs 2017 开发环境配置
  4. Rope的简单介绍
  5. Qt 出现“undefined reference to `vtable for”原因总结
  6. Pro Android学习笔记 ActionBar(1):Home图标区
  7. Linux 下spark安装
  8. linux中的vim编辑器的使用
  9. Apache中 RewriteCond 规则参数介绍 转
  10. HDU - 6242:Geometry Problem(随机+几何)