|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 22:00:01 2025 UTC |
Description: ------------ Hi there, I need to use PHP's URL rewriter for sessions with a built-in web client that cannot support cookies but also has 'special' HREF attributes on certain tags, such as href="*title". While I admit that this is certainly quite an edge case, I could certainly see many uses for a callback for the PHP URL rewriter function (passes original URL and what PHP would rewrite the URL to, function returns new URL to replace the original), for validation and such :-) Test script: --------------- <?php function url_footobar($original, $rewritten) { return str_replace('foo', 'bar', $rewritten); } url_rewriter_callback('url_footobar()'); ?> <a href="http://foo.com/foo.php">foo</a> Expected result: ---------------- <a href="http://bar.com/bar.php">foo</a>