Forum Discussion
static web farm fixing 403 issue
Hello All,
I am currently setting up a static web farm which should handle all http requests that contain certain file type extensions. I have used a http polciy on the F5 to accomplish this. I have disabled the static web farm's ability to handle dynamic content like php, when requested it will throw a 403. Everything seems to work as expected with the exception of websites which run wordpress and are providing the ability to have custom 404 responses. in the .htaccess files of these sites they are catching any requests for files that do not exsist and rewriting the request to a php file like this:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
This is causing my static web servers to respond with a 403, and breaking the sites ability to generate custom 404 pages. I was wondering what the best approach for me would be to fix this issue. I was thinking of the following logic:
CLIENT HTTP REQUEST --> LB
LB looks at request:
> if file extension is static AND custom header is not set THEN forward to static apache pool
> if above rule does not match, use default pool (dynamic pool)
apache on static farm responds to request:
> on 200, LB forwards this exact response back to client
> on 403, LB rewrites response to be a redirect with same request and also injects a custom header
Is there any better way to do this? Can the above logic be applied with the use of policies or does it have to be done with an irule? Anyone have any similair issues? Also please note that i cannot modify user content to accomplish this.
Thanks
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com