httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franck Davy <Franck.D...@hsc.fr>
Subject Re: [users@httpd] mod_rewrite / mod_jk
Date Mon, 18 Aug 2003 14:00:02 GMT
* hans huber <hans.huber@virtual-identity.com> [18/08/03 - 15:07]:
> Hello,

    Hello,

[...]
> Is there a way of moving up the rewrite engine in the priority so that
> it is executed before mod_jk comes is involed? Or do you know another
> way of achieving my needs? (It would work with a 302 Redirect, but I
> wouldn't like that very much ).

    As a third-part module, mod_jk is by default the last module to be
    loaded at runtime by Apache, and, as a consequence, the first active
    module for the URI-to-Filename hook (added last -> executed first).
    In order to enable mod_rewrite's processing, you have to add mod_jk
    _before_ mod_rewrite in your http.conf file. For instance, you can
    use the AddModule directive to change modules' loading order at
    runtime :
    
8< ------------------------------------------
ClearModuleList
AddModule mod_env.c
[...]
AddModule mod_cgi.c
AddModule mod_alias.c
AddModule mod_jk.c              #  <--·
AddModule mod_rewrite.c         #     |
AddModule mod_access.c          #     |
[...]                          
AddModule mod_setenvif.c        #     |
AddModule mod_ssl.c             #     |
# AddModule mod_jk.c            #  ---·
8< ------------------------------------------


    Then, you can rewrite URI with mod_rewrite engine, using the PT flag
    (important!) - standing for PassThrought (see mod_rewrite doc. for
    further details) - and finally have it processed by mod_jk :

8< --------------------------------------------------------
<VirtualHost virtual:443>
[...]
RewriteEngine On

RewriteLogLevel 3
RewriteLog /var/log/apache/rewrite.log

RewriteRule ^/app/$ /app/index.html [PT]

JkMount /app/* ajp13
[...]
</VirtualHost>
8< --------------------------------------------------------


    Regards,

-- 
Franck Davy <Franck.Davy@hsc.fr>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message