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