Well I solved part of my problem using rewriting rules only.



RewriteCond % { HTTP_USER_AGENT } !^JavaCrawler/1.1
RewriteRule ^/consulter/fichiers(.*) http: //LOCAL_SERVER:10038/consulter/fichiers$1 [P]
 
RewriteCond % { HTTP_USER_AGENT } ^JavaCrawler/1.1
RewriteCond % { REMOTE_ADDR } ^LOCAL_SERVER_IP_ADDRESS
RewriteRule ^/consulter/fichiers(.*) http: //LOCAL_SERVER:10038/consulter/indexer$1 [P]