|
@@ 159-162 (lines=4) @@
|
| 156 |
|
$request->attributes->set('needsRedirect', true); |
| 157 |
|
// Specify not to prepend siteaccess while redirecting when applicable since it would be already present (see UrlAliasGenerator::doGenerate()) |
| 158 |
|
$request->attributes->set('prependSiteaccessOnRedirect', false); |
| 159 |
|
} elseif ($this->needsCaseRedirect($urlAlias, $requestedPath, $pathPrefix)) { |
| 160 |
|
$request->attributes->set('semanticPathinfo', $this->removePathPrefix($urlAlias->path, $pathPrefix)); |
| 161 |
|
$request->attributes->set('needsRedirect', true); |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
if (isset($this->logger)) { |
| 165 |
|
$this->logger->info("UrlAlias matched location #{$urlAlias->destination}. Forwarding to ViewController"); |
|
@@ 175-179 (lines=5) @@
|
| 172 |
|
if ($urlAlias->forward) { |
| 173 |
|
$request->attributes->set('semanticPathinfo', '/' . trim($urlAlias->destination, '/')); |
| 174 |
|
$request->attributes->set('needsRedirect', true); |
| 175 |
|
} elseif ($this->needsCaseRedirect($urlAlias, $requestedPath, $pathPrefix)) { |
| 176 |
|
// Handle case-correction redirect |
| 177 |
|
$request->attributes->set('semanticPathinfo', $this->removePathPrefix($urlAlias->path, $pathPrefix)); |
| 178 |
|
$request->attributes->set('needsRedirect', true); |
| 179 |
|
} else { |
| 180 |
|
$request->attributes->set('semanticPathinfo', '/' . trim($urlAlias->destination, '/')); |
| 181 |
|
$request->attributes->set('needsForward', true); |
| 182 |
|
} |