سؤال

I want to redirect to error page if the requested URI comes up with the 500 error. I did some thing like this:

ErrorDocument 500 /Errors/500.php?p=%{REQUEST_URI}

to send to "500.php" the requested uri as a GET param to handle the request. But the 500.php does not receive the GET param.

How do I do this?

Thanks in advance.

هل كانت مفيدة؟

المحلول

you can just use $_SERVER['REQUEST_URI'] in your php file. e.g.

echo $_SERVER['REQUEST_URI'];

should show the link, the user requested.

نصائح أخرى

"500.php" won't get any parameter because you are calling 505.php

did you try phpinfo(32); by the way? I am pretty sure you have your request already, with no additional parameters.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top