Req #73221 [NEW]: Callback for PHP URL rewriter
From: josh dot kelly27 at outlook dot com
Operating system: Ubuntu 16.04.1LTS
PHP version: 7.1.0RC3
Package: Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:Callback for PHP URL rewriter
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>
--
Edit bug report at https://bugs.php.net/bug.php?id=73221&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73221&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73221&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73221&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73221&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73221&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73221&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73221&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73221&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73221&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73221&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73221&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73221&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73221&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73221&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73221&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73221&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73221&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73221&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73221&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73221&r=mysqlcfg
Thread (1 message)
- josh dot kelly27 at outlook dot com