Käynnissä

Error Handler

We need an ErrorDocument 404 php error handler for bad links including dropped pages on a web site or requests for a url that has never been on the site. Note that mod_rewrite is in heavy use on the site.

Specification:

Redirection to a simple php page, i.e. [url removed, login to view] in the root directory of the site to be handled by simple .htaccess code. (ErrorDocument 404 /[url removed, login to view]).

We must return a 404 error to the requesting source AND display html code from within the [url removed, login to view] handling. Please note that we will replace test html code with a smarty include directive to our error page from within Err404.php.

A primary specification is that code 200 is NOT sent to a requestor because error redirection forwards a request to our error page, i.e. the url may be bad but a resulting page does exist due to error handling and therefore the request was satisfied without a 404 error.

Mod_rewrite is used extensively on this site from .htaccess, and to some extent from [url removed, login to view] and the code has to handle redirection for rewritten urls that no longer exist.

Example of desired handling:

There is an existing .htaccess rule for [url removed, login to view] although it has been deleted.

htaccess snippet:

RewriteRule ^[url removed, login to view](&xid=[0-9a-f]*)?$ [url removed, login to view];%1 [L]

A request for [url removed, login to view] can return 200 OR return 404 AND it must cause redirection to the error page called by Err404.php.

Another example:

[url removed, login to view] - a url that never has existed on the site is requested.

Your code MUST result in both a 404 code return AND redirection from [url removed, login to view] to a valid page.

Taidot: PHP

Näytä lisää: web site error, request specification, mod_rewrite error handling, htaccess error handling, mod_rewrite error handler 404, valid id, error 0, bad l, index php id, snippet, error, error php, code snippet web, htaccess replace, htaccess mod_rewrite, smarty page, 404 page, html code error, http bad request, htaccess rule, 404, simple php html example display, valid without, rewriterule htaccess, handler url

Tietoa työnantajasta:
( 9 arvostelua ) san diego, United States

Projektin tunnus: #186971

Myönnetty käyttäjälle:

nitrocube

please check the PM, thanks

35 $ USD 1 päivässä
(14 arvostelua)
4.9

4 freelanceria on tarjonnut keskimäärin 44 $ tähän työhön

wincent

its very easy for me.

50 $ USD 0 päivässä
(79 arvostelua)
6.0
devaka

I can help with this problem

50 $ USD 1 päivässä
(24 arvostelua)
5.2
zecho

There is no problems to do the job. Contact me for details.

40 $ USD 1 päivässä
(11 arvostelua)
4.8