Luke Childs
9 years ago
3 changed files with 44 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
# Frontend Redirects |
|||
|
|||
Redirect 301 /deleted-page/ https://website.com/new-page/ |
|||
Redirect 302 /new-feature/ https://website.com/coming-soon/ |
|||
|
|||
# Admin Redirects |
|||
|
|||
Redirect 301 /admin/ https://website.com/?login=true |
|||
|
|||
# Test alignment |
|||
|
|||
Redirect 301 /old-short-url/ https://website.com/new-short-url/ |
|||
Redirect 301 /old-loooooooooong-url/ https://website.com/new-long-url/ |
@ -0,0 +1,23 @@ |
|||
# Frontend Redirects |
|||
|
|||
location /deleted-page/ { |
|||
return 301 https://website.com/new-page/; |
|||
} |
|||
location /new-feature/ { |
|||
return 302 https://website.com/coming-soon/; |
|||
} |
|||
|
|||
# Admin Redirects |
|||
|
|||
location /admin/ { |
|||
return 301 https://website.com/?login=true; |
|||
} |
|||
|
|||
# Test alignment |
|||
|
|||
location /old-short-url/ { |
|||
return 301 https://website.com/new-short-url/; |
|||
} |
|||
location /old-loooooooooong-url/ { |
|||
return 301 https://website.com/new-long-url/; |
|||
} |
@ -1,7 +1,15 @@ |
|||
import test from 'ava'; |
|||
|
|||
import { readFileSync } from 'fs'; |
|||
import htconvert from '../dist/htconvert'; |
|||
|
|||
const input = readFileSync('./fixtures/input', 'utf-8'); |
|||
const output = readFileSync('./fixtures/output', 'utf-8'); |
|||
|
|||
test('htconvert should export a function', t => { |
|||
t.is(typeof htconvert, 'function'); |
|||
}); |
|||
|
|||
test('htconvert should match input with output', t => { |
|||
t.is(htconvert(input), output); |
|||
}); |
|||
|
Loading…
Reference in new issue