# navigateToURL bug? error?

**URL:** <https://forum.kirupa.com/t/navigatetourl-bug-error/325702>\
**Category:** flash\
**Created:** [October 31, 2011, 6:41pm UTC](https://forum.kirupa.com/t/navigatetourl-bug-error/325702 "2011-10-31T18:41:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![999chris](https://avatars.discourse-cdn.com/v4/letter/9/f17d59/32.png) [@999chris](https://forum.kirupa.com/u/999chris)\
**Post date:** [October 31, 2011, 6:41pm UTC](https://forum.kirupa.com/t/navigatetourl-bug-error/325702/1 "2011-10-31T18:41:47Z")

</div>

Hello,

I have following code:

```auto
function mouseU(m:MouseEvent)
{
	if (m.target.text)
	{
		var target:String = m.target.text.toLowerCase();
		for (var i:uint; i<buttons.length; i++)
		{
			if (target == buttons*)
			{

				var url:String = "index.php?id=" + target;
				
				var uReq:URLRequest = new URLRequest(url);
				
				try
				{
					navigateToURL(uReq, '_top');// second argument is target
				}
				catch (e:Error)
				{
					trace("Error occurred!");
				}
				
				break;
			}
		}
	}

}

```

As you can see the string used with the “navigateToURL” function should reslove as “index.php?=home” for instance,… however in a browser it appears as:

“[http://index.php/?id=home](http://index.php/?id=home)”

As you can see, somewhere along the line a forward slash has been added. Why is this happening?
