Your solutions looks very useful, but i'm afraid about impact on server
performance.

Do you have any idea about the impact on performance?

Thanks a lot

On Wed, Aug 26, 2009 at 2:59 PM, Tom Evans <tevans...@googlemail.com> wrote:

> On Wed, 2009-08-26 at 12:23 +0100, Andrew Hole wrote:
> > Hi guys!
> >
> > Actually our web application has a retry mechanism based on http
> > status code returned to client. Just an example:
> > - An http request is made to http://web/software_A_folder/file.swf
> > - if the file doesn't exist (http 404) on software_A_folder, the
> > request is made in core folder: http://web/core/file.swf
> >
> > This mechanism is used on entire application: when a file doesn't
> > exist on software_x_folder, a retry is made on core folder.
> >
> > In terms of Apache, this mechanism make always 2 requests (in case of
> > file not found).
> >
> > What I want to know is if there are any option on Apache to handle 404
> > status code without retry the request. When file not found, some logic
> > will handle the 404 and return the file located on other folder.
> >
> > I appreciate your help.
> >
> > Best Regards,
> > A.
>
> This looks like a simple rewrite rule surely?
>
>        RewriteEngine On
>        RewriteCond %{REQUEST_FILENAME} !-f
>        RewriteCond %{REQUEST_URI} ^/software_A_folder/(.*)
>        RewriteCond %{DOCUMENT_ROOT}/core/%1 -f
>        RewriteRule ^/software_A_folder/(.*) /core/$1 [L]
>
> Cheers
>
> Tom
>
>
>
> ---------------------------------------------------------------------
> 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-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Reply via email to