大家都知道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. idea解决@Data注解报红问题

    lombok是一个可以通过简单的注解的形式来帮助我们简化消除一些必须有但显得很臃肿的 Java 代码的工具,简单来说,比如我们新建了一个类,然后在其中写了几个字段,然后通常情况下我们需要手动去建立ge ...

  2. LCS 的 NlogN作法

    这个算法其实是因为LIS有NlogN的作法,把LCS转化为了LIS来做. 对于序列A{},B{},我们可以记录下来B中的每个元素在A中出现的位置,按顺序保存在一个新序列当中, 如果有多个位置按倒序写, ...

  3. 神经网络训练时出现nan错误

    现在一直在用TensorFlow训练CNN和LSTM神经网络,但是训练期间遇到了好多坑,现就遇到的各种坑做一下总结 1.问题一;训练CNN的时候出现nan CNN是我最开始接触的网络,我的研究课题就是 ...

  4. hdu4715

    题解: 二分图判断 建立原图的补图 判断是否是二分图 代码: #include<cstdio> #include<cmath> #include<cstring> ...

  5. spring 多数据源动态切换

    理解spring动态切换数据源,需要对spring具有一定的了解 工作中经常遇到读写分离,数据源切换的问题,那么以下是本作者实际工作中编写的代码  与大家分享一下! 1.定义注解 DataSource ...

  6. 集合类Collection Map

    数组与集合的区别:数组虽然也可以存储对象,但长度是固定的:集合的长度是可变的,数组中可以存储基本数据类型,集合只能存储对象. 集合特点:1.用于存储对象:  2.长度可变: 3.可存储不同对象: 一. ...

  7. mcake活动维护常见问题记录【wap端】 ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★

    ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ wap端问题及解决方法 ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ 一.wap端弹窗 .Dialogbg-Select{ background-co ...

  8. Linux系统下的shutdown命令用于安全的关闭/重启计算机

    Linux系统下的shutdown命令用于安全的关闭/重启计算机,它不仅可以方便的实现定时关机,还可以由用户决定关机时的相关参数.在执行shutdown命令时,系统会给每个终端(用户)发送一条屏显,提 ...

  9. Golang的接口

    当一只鸟走路像鸭子,游泳像鸭子,叫起来也像鸭子,那么我们就认为它就是鸭子. Duck typing 的理念因此比喻得名. Golang 通过 interface 实现 duck typing. Eff ...

  10. Kotlin For Gank.io (干货集中营Kotlin实现)

    介绍 Kotlin,现在如火如荼,所以花了一点时间把之前的项目用Kotlin重构一下 原项目地址:https://github.com/onlyloveyd/GankIOClient 对应Kotlin ...