[opencms-dev] Remove 'opencms/opencms' of url

Daniel daoquan at gmail.com
Tue Jul 5 10:58:19 CEST 2011


 Hi,
I used mod_rewrite to do this befor,but it coused a browser redirect.So, I
write a filter to do the work instead.

Here is my solution to remove 'opencms/opencms' from url, 3 steps.
1、deploy opencms as ROOT webapp
2、mapping my filter in web.xml
<filter>
<filter-name>UriRewriteFilter</filter-name>
<filter-class>com.dcampus.opencms.web.UriRewriteFilter</filter-class>
<init-param>
<param-name>ignore-uri</param-name>
<param-value>/opencms/,
/resources/,
/export/,
/setup/,
/update/,
/webdav/,
/opencms-errorhandler/</param-value>
</init-param>
<init-param>
<param-name>prefix</param-name>
<param-value>/opencms</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UriRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
3、change contex parameter “OpenCmsServlet” from “/opencms/*” to "/*"

If you have more uri to excluded from VFS, add it to the "ignore-uri"
parameter.

P.S.,Thanks to the opencms team, you have done a great job.



2011/6/17 Deiverson Silveira <deiverson at solutioncms.com>

> Hi Alejandro,
>
> Proxy Pass:
>
> http://www.sebastian.himberger.de/blog/2009/03/11/opencms-apache-integration-the-simplest-solution/
>
> (You dont need use ajp, you can use redirect for http)
>
> Mod_JK and Rewrite:
>
> http://www.sebastian.himberger.de/comp/tutorials/opencms/apache-integration/
>
> Regards,
>
> Deiverson Silveira
>
>   2011/6/17 Alejandro García Gil <alejandro.garcia.gil at gmail.com>
>
>>  Hi,
>>
>> I would like to eliminate 'opencms/opencms in the url of my website
>>
>> I've seen different methods but they do not see correctly the area of
>> administration
>>
>> I have opencms 7.5.2
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>
>
>
> --
> *
>  www.solutioncms.com
>   The Brazilian
> Official Provider OpenCms
> *
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110705/ed9363b6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UriRewriteFilter.java
Type: application/octet-stream
Size: 3174 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110705/ed9363b6/attachment.obj>


More information about the opencms-dev mailing list