Skip to content

Commit a4868a6

Browse files
committed
Remove trailing slash on home url
1 parent eea5d03 commit a4868a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UrlBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct($url)
4343
public function build($absolute = true)
4444
{
4545
$host = $absolute ? $this->get('scheme') . '://' . $this->get('host') . (($port = $this->get('port')) ? ":{$port}": '') : '';
46-
$path = '/' . trim($this->get('path'), '/');
46+
$path = rtrim('/' . ltrim($this->get('path'), '/'), '/');
4747
$query = $this->get('query') ? '?' . $this->get('query') : '';
4848

4949
return $host . $path . $query;

0 commit comments

Comments
 (0)