httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Pasher <just...@newmediagateway.com>
Subject Re: [users@httpd] java app URL rewrite
Date Thu, 18 Sep 2008 16:14:27 GMT
Stauffer, Robert G wrote:
> Hi all,
>
> OK, I'm stummped.  I'm new to URL rewriting and I have one I struggling
> with.  I've messed with it for a few days, but can't seem to get very
> far.
>
> Environment:
> Web server: IBM HTTP Server 6.0.2.23 - based on Apache 2.0.47
> App server: IBM WebSphere App Server 6.0.2.23
> Java app: Jahia Content Management System 5.0.3
> OS: RHEL ES4
>
> App server info:
> Servlet name: Jahia
> Context root: /jahia
> Servlet path: /Jahia
>
> All URL's are in the form
> http://<hostname>:<port>/jahia/Jahia/site/jazzd/pid/<page id>
>
> Home page: http://portal-dev:81/jahia/Jahia/site/jazzd/pid/9
>
> The task: strip out jahia/Jahia from all URL's.
>
> Example:
> Rewrite http://portal-dev:81/jahia/Jahia/site/jazzd/pid/9 to
> http://portal-dev:81/site/jazzd/pid/9, but display URL in the browser as
> http://portal-dev:81/site/jazzd/pid/9.
>
> I have the stuff below in the httpd.conf.  It serves up the correct
> page, but the browser URL is http://portal-dev:81/ instead of
> http://portal-dev:81/site/jazzd/pid/9.
>
> <VirtualHost portal-dev.dande.com:81>
>   RewriteEngine On
>   RewriteLogLevel 3
>   RewriteLog logs/rewrite_port81.log
>   RewriteRule ^/$ /jahia/Jahia/site/jazzd/pid/9 [C,PT]    (This
> redirects properly, but the next line is ignored.)
>   RewriteRule ^jahia/Jahia/(.+)$ $1 [L]
> </VirtualHost>

Have you tried using this?

RewriteRule ^/jahia/Jahia/(.+)$ $1 [L]

Notice the slash at the beginning.

-- 
Justin Pasher

---------------------------------------------------------------------
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