Skip to content

Commit 7c70488

Browse files
authored
Merge pull request #108 from craftcms/feature/redirects
Include redirects boilerplate
2 parents e8e2da3 + a35ae11 commit 7c70488

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

config/redirects.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
/**
3+
* Redirection Rules
4+
*
5+
* Rules returned in this array are evaluated only after Craft would ordinarily
6+
* throw a 404 exception. They can be key-value pairs representing “from”
7+
* and “to” URIs…
8+
*
9+
* ```php
10+
* return [
11+
* 'old/path' => 'new/path',
12+
* ];
13+
* ```
14+
*
15+
* …or a nested array with `from`, `to`, `caseSensitive`, and `statusCode` keys:
16+
*
17+
* ```php
18+
* return [
19+
* [
20+
* 'from' => 'Helpdesk.aspx',
21+
* 'to' => 'account/tickets',
22+
* 'caseSensitive' => true,
23+
* 'statusCode' => 301,
24+
* ],
25+
* ];
26+
* ```
27+
*
28+
* Read all about Craft’s redirection behavior and capabilities, here:
29+
* @link https://craftcms.com/docs/5.x/system/routing.html#redirection
30+
*/
31+
32+
return [];

0 commit comments

Comments
 (0)