xref: /PHP-7.3/ext/session/tests/bug74892.phpt (revision 68296c40)
1--TEST--
2Bug #74892 Url Rewriting (trans_sid) not working on urls that start with #
3--FILE--
4<?php
5ini_set('session.use_cookies', '0');
6ini_set('session.use_only_cookies',0);
7ini_set('session.use_trans_sid',1);
8ini_set('session.trans_sid_hosts','php.net');
9session_id('sessionidhere');
10session_start();
11
12?>
13<p><a href="index.php">Click This Anchor Tag!</a></p>
14<p><a href="index.php#place">External link with anchor</a></p>
15<p><a href="http://php.net#foo">External link with anchor 2</a></p>
16<p><a href="#place">Internal link</a></p>
17===DONE===
18--EXPECT--
19<p><a href="index.php?PHPSESSID=sessionidhere">Click This Anchor Tag!</a></p>
20<p><a href="index.php?PHPSESSID=sessionidhere#place">External link with anchor</a></p>
21<p><a href="http://php.net?PHPSESSID=sessionidhere#foo">External link with anchor 2</a></p>
22<p><a href="#place">Internal link</a></p>
23===DONE===
24