Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Routing issue with installation in a sub-directory

ref: #7129
  • Loading branch information...
commit 8d9cd42acdc0baea285046428f7fcaf8da6909a2 1 parent ae5b94f
@DHorchler DHorchler authored
View
2  src/Symfony/Bundle/FrameworkBundle/Routing/Router.php
@@ -94,7 +94,7 @@ private function resolveParameters(RouteCollection $collection)
foreach ($route->getRequirements() as $name => $value) {
$route->setRequirement($name, $this->resolveString($value));
}
-
+ $collection->setPrefix('/'.ltrim($this->resolveString($collection->getPrefix()), '/'));
$route->setPattern($this->resolveString($route->getPattern()));
}
}
View
10 src/Symfony/Component/Routing/RouteCollection.php
@@ -260,6 +260,16 @@ public function getPrefix()
}
/**
+ * Sets the prefix (used to resolve placeholders).
+ *
+ * @param string The prefix
+ */
+ public function setPrefix($prefix)
+ {
+ $this->prefix = $prefix;
+ }
+
+ /**
* Returns an array of resources loaded to build this collection.
*
* @return ResourceInterface[] An array of resources
Please sign in to comment.
Something went wrong with that request. Please try again.