Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions reroute/services/RerouteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public function getById($rerouteId)
* @return array
*/
public function getByUrl($url) {
// Remove any trailing slashes from the URL before looking it up:
// (to ensure /page and /page/ are treated the same)
$url = rtrim($url, '/');

$reroute = craft()->db->createCommand()
->select('id, oldUrl, newUrl, method')
->from('reroute')
Expand Down