Java Mailing List Archive

http://www.apache-httpd.com/

Home » users.httpd »

Re: [users@httpd] RewriteMap with Java

Eric Covener

2008-07-15

Replies: Find Java Web Hosting

Author LoginPost Reply
On Tue, Jul 15, 2008 at 4:26 AM, Anazys - Apache <apache@(protected):
> Hi all,
>
> I try tu use a RewriteMap to rewrite dynamically urls on MacOS 10.5 Leopard
> Server. The code is really simple in the http.conf file :
>
>     RewriteMap   mymap     prg:/path/to/map.class
>     RewriteRule  ^/path/(.*)$ /path/page?${mymap:$1}
>
> But when I launch Apache, I have this message in error log :
>     [Mon Jul 14 15:47:43 2008] [error] (86)Bad CPU type in executable:
> exec of '/etc/apache2/Main.class' failed
>
> Anybody knows what could be the problem ?
> Is it possible tu use a Java file for RewriteMap ?
>

You need to write a shell script that launches java class, and use the
script in your Apache config. Class files are not executables.


--
Eric Covener
covener@(protected)

---------------------------------------------------------------------
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@(protected)
 "  from the digest: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.