[opencms-dev] handle404 appears on every 404 page within the export folder

Graeme Kidd coolkidd3 at hotmail.com
Thu Aug 26 18:09:07 CEST 2010



Yes sorry I copy and pasted from the documentation and not my real config so it does actually says:
RewriteRule .* balancer://mycluster/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P] 

Any other ideas?

Thanks,
Graeme


----------------------------------------
> Date: Thu, 26 Aug 2010 09:36:58 +0200
> From: m.jaeger at alkacon.com
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] handle404 appears on every 404 page within the export folder
>
> Hi Graeme,
>
> It seems, that you use Apache with mod_jk.
>
> Please, have a look here to check your configuration: http://www.opencms-wiki.org/MultiSite_configuration_instructions_%28apache_%2B_mod_jk%29
>
> I think one point is, that you should use the following line in the Apache configuration, if your OpenCms installation is installed as the ROOT application in Tomcat:
>
> RewriteRule .* http://127.0.0.1:8081/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]
>
> instead of that line:
>
> RewriteRule .* http://127.0.0.1:8081/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]
>
> --
> Kind Regards,
> Mario.
>
> -------------------
> Mario Jäger
>
> Alkacon Software GmbH - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
>
> Graeme Kidd schrieb:
>> Hi,
>>
>> I am using the "CmsOnDemandStaticExportHandler" Static Export Handler which requires the following mod_rewrite configuration:
>> RewriteCond %{REQUEST_URI} ^/export/(.*) [NC]
>> RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f
>> RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
>> RewriteRule .* http://127.0.0.1:8081/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]
>>
>> This all works fine when the resource doesn’t exist but is still to be exported, what I find annoying however is when the file really doesn't exist. As it causes the 404 page to say this within the export directory:
>> "The requested resource "/handle404" was not found on the server."
>>
>> So for example you could have:
>> http://www.test.com/export/doesnotexist.gif
>>
>> Then instead of saying:
>> The requested resource "/export/doesnotexist.gif" was not found on the server.
>>
>> It says:
>> The requested resource "/handle404" was not found on the server.
>>
>> I have tried changing the line to "request.getRequestURL()" and "request.getServletPath()" but they both return a path that includes handle404.
>>
>> The only way round this I can think of would be to use JavaScript in the handle404.jsp page e.g.
>> "document.location.href"
>>
>> If that is the best solution then might I suggest that a future improvement would be to detect if the file really doesn’t exist and return the URI to its original location.
>>
>> Thanks,
>> Graeme
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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
 		 	   		  


More information about the opencms-dev mailing list