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>

logs/rewrite_port81.log:
10.208.4.137 - - [18/Sep/2008:11:54:17 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (2) init rewrite engine
with requested uri /
10.208.4.137 - - [18/Sep/2008:11:54:17 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (3) applying pattern '^/$'
to uri '/'
10.208.4.137 - - [18/Sep/2008:11:54:17 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (2) rewrite / ->
/jahia/Jahia/site/jazzd/pid/9
10.208.4.137 - - [18/Sep/2008:11:54:17 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (2) forcing
'/jahia/Jahia/site/jazzd/pid/9' to get passed through to next API
URI-to-filename handler
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (2) init rewrite engine
with requested uri /jazzdassets/scripts/tabber.js
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (3) applying pattern '^/$'
to uri '/jazzdassets/scripts/tabber.js'
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (3) applying pattern
'^jahia/Jahia/(.+)$' to uri '/jazzdassets/scripts/tabber.js'
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c5400/initial] (1) pass through
/jazzdassets/scripts/tabber.js
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c9410/initial] (2) init rewrite engine
with requested uri /jazzdassets/css/tabber.css
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c9410/initial] (3) applying pattern '^/$'
to uri '/jazzdassets/css/tabber.css'
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c9410/initial] (3) applying pattern
'^jahia/Jahia/(.+)$' to uri '/jazzdassets/css/tabber.css'
10.208.4.137 - - [18/Sep/2008:11:54:18 --0400]
[portal-dev/sid#8122b18][rid#81c9410/initial] (1) pass through
/jazzdassets/css/tabber.css
...

I've tried various permutations of RewriteRule, but I can't seem to find
the right one.  Any thoughts on how to do this?




Bob Stauffer
DBA
D&E Communications
Ephrata, PA
[EMAIL PROTECTED]
717-738-8737

**DISCLAIMER
This e-mail message and any files transmitted with it are intended for the use 
of the individual or entity to which they are addressed and may contain 
information that is privileged, proprietary and confidential. If you are not 
the intended recipient, you may not use, copy or disclose to anyone the message 
or any information contained in the message. If you have received this 
communication in error, please notify the sender and delete this e-mail 
message. The contents do not represent the opinion of D&E except to the extent 
that it relates to their official business.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to