Rewrite example of Apache HTTP

来源:互联网 发布:java中文api文档下载 编辑:程序博客网 时间:2024/05/15 23:53
<VirtualHost *>
    DocumentRoot /data/www/pull
    ServerName qsp.morningstar.com


#   Alias / /pullservice/pull
#       RewriteEngine On
#       #RewriteBase   /
#       RewriteRule ^(([a-zA-Z])[a-z0-9A-Z]+)(.jsp) pullservice/pull/$1 [R,L]
#RewriteRule ^funds/cef/total-returns\.action(.*) PerformanceWeb/cef/performance-return.action?p=total_returns_page&%{QUERY_STRING} [L]

JkMount /pullservice/pull/*.jsp Pull_Tomcat

RewriteEngine On
#RewriteCond %{HTTP_HOST} ^qsp.morningstar.com
RewriteCond %{REQUEST_URI} !pullservice
#RewriteCond %{REQUEST_URI} \.jsp$
#RewriteRule (.*)\.jsp$ http://qsp.morningstar.com/pullservice/pull$1\.jsp [R,L]
RewriteRule ([a-zA-Z]+)\.jsp$ http://qsp.morningstar.com/pullservice/pull/$1\.jsp [L]
#RewriteRule (.*)\.jsp$ pullservice/pull$1\.jsp [R,L]


    JkMount /pullservice/pull/*.jsp Pull_Tomcat

    <Directory "/pullservice/pull">
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
原创粉丝点击