htaccess file: Twitter archive redirect, 404 page
This commit is contained in:
parent
13c2164bbd
commit
263e04b828
3 changed files with 18 additions and 0 deletions
8
Rules
8
Rules
|
|
@ -22,6 +22,10 @@ compile '/styles/*' do
|
|||
end
|
||||
end
|
||||
|
||||
compile "/htaccess" do
|
||||
filter :erb
|
||||
end
|
||||
|
||||
compile '*' do
|
||||
item_name = if item.identifier=="/"
|
||||
""
|
||||
|
|
@ -59,6 +63,10 @@ route '/styles/*' do
|
|||
item.identifier.chop + '.css'
|
||||
end
|
||||
|
||||
route "/htaccess" do
|
||||
"/.htaccess"
|
||||
end
|
||||
|
||||
route '*' do
|
||||
if item.binary?
|
||||
item.identifier.chop + '.' + item[:extension]
|
||||
|
|
|
|||
6
content/404.md
Normal file
6
content/404.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
-----
|
||||
title: 404 - page not found
|
||||
kind: page
|
||||
-----
|
||||
Whoopsie!
|
||||
|
||||
4
content/htaccess.txt
Normal file
4
content/htaccess.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
ErrorDocument 404 /404/index.html
|
||||
|
||||
Redirect 301 /archives/twitter/ /archives/twitter/<%= twitter_grouped_by_month.keys.sort.last %>/
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue