Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
iv-craig committed Dec 22, 2015
2 parents 3d02b5f + 68aa3df commit 997d31e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ Type: ```Boolean``` Default: ```true```

Whether the homepage's URL (i.e. '/home') should have a 301 redirect to the base URL.

##### redirecty-self

Type: ```String``` Default: ```Homepage```

Where the redirects list should redirect to. Set to whatever URI the redirects list page should redirect to, or set to false to not have it redirect at all. Added so you don't have to remember to redirect the list itself.

##### redirecty-subfolder

Type: ```Boolean``` Default: ```false```
Expand Down
5 changes: 5 additions & 0 deletions redirecty.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ function redirecty() {
if(c::get('redirecty-home', true) && page($uri) && page($uri)->isHomePage())
header::redirect(url());

$self = c::get('redirecty-self', url());

if($self && $uri==$redirectsURI)
header::redirect($self);

foreach($redirects as $redirect):

$match = r($caseSensitive, $uri==$redirect->old(), $uri==str::lower($redirect->old()));
Expand Down

0 comments on commit 997d31e

Please sign in to comment.