L
lihao0129
Hi, there:
I have a question about grabbing the URI information of a redirected
weblink. For example, in my Apache configuration file, I added:
ErrorDocument 404 /error.html
then if I enter a wrong URL like:
http://myweb.com/dir/non-exist.html
the httpd server will automatically redirect my request to
http://myweb.com/error.html...
Now I want to display some dynamic information in error.html, for
example, the original request URL:
http://myweb.com/dir/non-exist.html
In HTML::Mason, I tried adding:
$m->request_comp->source_file
# returns /comp/root/error.html
$r->uri()
# returns /error.html
which are not what I wanted..
Are there any functions in mod_perl or HTML::Mason or other APIs that
I can grab '/dir/non-exist.html' from within '/error.html'..
Thank you very much for your input and suggestions..
Best regards,
Hao
I have a question about grabbing the URI information of a redirected
weblink. For example, in my Apache configuration file, I added:
ErrorDocument 404 /error.html
then if I enter a wrong URL like:
http://myweb.com/dir/non-exist.html
the httpd server will automatically redirect my request to
http://myweb.com/error.html...
Now I want to display some dynamic information in error.html, for
example, the original request URL:
http://myweb.com/dir/non-exist.html
In HTML::Mason, I tried adding:
$m->request_comp->source_file
# returns /comp/root/error.html
$r->uri()
# returns /error.html
which are not what I wanted..
Are there any functions in mod_perl or HTML::Mason or other APIs that
I can grab '/dir/non-exist.html' from within '/error.html'..
Thank you very much for your input and suggestions..
Best regards,
Hao