各位大侠,帮忙看看.
现在是请求 apache直接处理的东东,就是 html,图片等,可以301转过去
请求动态内容就不行.难道是直接扔给tomcat了,没有管 .htaccess 的配置?主要配置:
httpd.conf...
AllowOverride All
...LoadModule jk_module modules/mod_jk-1.2.28-httpd-2.2.11.so
LoadModule rewrite_module modules/mod_rewrite.soJkWorkersFile conf/workers.properties
JkMountFile conf/uriworkermap.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat " [%a %b %d %H:%M:%S %Y] "
JkRequestLogFormat "%w %V %T"
workers.properties:# list the worders by name
worker.list=s1,status# localhost server 1
worker.s1.port=8019
worker.s1.host=localhost
worker.s1.type=ajp13
worker.status.type=status
uriworkermap.properties/*=s1
/jkstatus=status!/*.html=s1
!/*.jpg=s1
!/*.png=s1
!/*.css=s1
!/*.js=s1
!/*.htm=s1
!/*.html=s1

解决方案 »

  1.   

    设置成全局的可以解决问题
    禁用.htaccess文件httpd.xml...
    AllowOverride None
    ...
    LoadModule jk_module modules/mod_jk-1.2.28-httpd-2.2.11.so
    LoadModule rewrite_module modules/mod_rewrite.sorewriteEngine on
    rewriteCond %{http_host} ^yourdomain.com [NC]
    rewriteRule ^(.*) http://www.yourdomain.com$1 [R=301,L]JkWorkersFile conf/workers.properties
    JkMountFile conf/uriworkermap.properties
    JkLogFile logs/mod_jk.log
    JkLogLevel info
    JkLogStampFormat " [%a %b %d %H:%M:%S %Y] "
    JkRequestLogFormat "%w %V %T"