ozfe1's avatar
Level 4

URL with . and : does not work

Hi all,

I've spent the last 3 days trying to get a . and : in a GET request - in the format of IP address and port. e.g. http://localhost:8000/server/111.222.222.111:5555

Basically, it works with only dots, or only colons. If the URL contains a dot and colon, a 404 is thrown.

Route: Route::get('/server/{ipport}', ['uses' => 'ServerController@show', 'as' => 'server.show']);

I have tried several combinations of routes, e.g adding closures to the route as well, all to no avail.

Any ideas?

Thanks

0 likes
7 replies
Thyrosis's avatar

Hi!

Are the links clickable from your application or in a text field on another page, or do visitors need to type them in manually?

Because the easiest way around it is to urlencode that portion of the query string and link to that. That way you could put any kind of character in the url without it braking anything.

ozfe1's avatar
Level 4

Hi there,

Both. The link needs to be clickable and accessible directly from the URL - /server/111.222.222.111:5555

Thanks

incon's avatar

And encoding the . to %2e?

/server/111%2e222%2e222%2e111%3A5555

Please or to participate in this conversation.