[opencms-dev] Definitive guide to get rid of opencms/opencms in the url

Brendon Price Brendon.Price at sytec.co.nz
Thu Jul 17 07:54:01 CEST 2003


Hi Brian,

We also tried following the instructions and found the same issue, as did a
few others.
A simple solution is to use mod_rewrite in Apache to rewrite the URL's on
the published resources ONLY.
This does not get ride of the /opencms/opencms/ from the management
component but does present 
the correct URL to the end user, when viewing the published web site.

If you use this in combination with the right export rules defined in the
opencms.properties file,
you should be able to get a workable solution.

In our case we also have NTLM authentication which complicates issues, which
im sure you can remove.
We have one publically exported site called /public/.


<Location /public>
  AuthType NTLM
  NTLMAuth On
  NTLMAuthoritative On
  NTLMDomain DOMAIN
  NTLMServer PDC
  NTLMBasicRealm DOMAIN
  Require valid-user

  RewriteEngine On
  RewriteRule ^/.*/$ /opencms/export%{REQUEST_URI}/index.html [P]
  RewriteRule ^/.*$ /opencms/export%{REQUEST_URI} [P]
</Location>


<Location /pics>
  RewriteEngine On
  RewriteRule ^/.*$ /opencms/opencms/system/galleries%{REQUEST_URI} [P]
</Location>


<Location /opencms/>
</Location>


 RewriteEngine On
 RewriteRule ^/$ /public/index.html [R]
 RewriteRule ^/index\.html$ /public/index.html [R]


Hope this helps

Brendon

-----Original Message-----
From: Brian Sweeting [mailto:sweeting at infowest.com]
Sent: Thursday, 17 July 2003 3:16 p.m.
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Definitive guide to get rid of
opencms/opencms in the url


Sorry to have to bring this up again, but I posted a question on July 10 
about getting rid of the "opencms/opencms" from the url and still have 
not been able to resolve my problem.  I was directed to the PDF located 
at http://opencms.al-arenal.de/ but following all it's directions very 
closely, I am still unable to open any of my site pages without getting 
the error:

javax.servlet.ServletException: FlexDispatcher: Dectected inclusion loop 
for target /index.jsp
   at 
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java:186)
....

Is there anyone who has followed the directions in the PDF and had it work?

I am using OpenCMS 5.0 and Tomcat 4.1.24.

Thanks,
Brian

Brian Sweeting wrote:

> First of all...thank you for your help.
>
> I followed all the instructions in the PDF doc...
>
> *** web.xml ***
> Changed
> <url-pattern>/opencms/*</url-pattern>
> to
> <url-pattern>/*</url-pattern>
>
> *** opencms.properties ***
> Changed
> url_prefix_http=/${WEB_APP_NAME}/opencms
> to
> url_prefix_http=
>
> *** server.xml ***
> Added the context
> <Context path="" docBase="opencms" debug="0"/>
>
> *** registry.xml ***
> Changed
> <UseWpPicturesFromVFS>false</UseWpPicturesFromVFS>
> to
> <UseWpPicturesFromVFS>true</UseWpPicturesFromVFS>
>
> Note: I decided to leave out the configuration of 
> Apache/mod_jk2/Tomcat and I'm going directly through tomcat.
>
> After completing these steps I can go to 
> http://localhost:8080/system/login and I can login and everything 
> looks correct in the workplace.  But when I try to access a file, for 
> instance index.jsp in the root of the VFS, 
> (http://localhost:8080/index.jsp) I get the error:
>
> javax.servlet.ServletException: FlexDispatcher: Dectected inclusion 
> loop for target /index.jsp
>    at 
>
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java:186) 
>
> ....
>
> This happens when I try to access any file whether it is a regular 
> page (.html) or jsp.
>
> Brian


_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list