muflax65ngodyewp.onion/content/htaccess.erb

29 lines
665 B
Plaintext
Raw Normal View History

---
is_hidden: true
non_cognitive: true
---
2011-09-05 19:05:40 +02:00
# manual 404 page
ErrorDocument 404 /404/index.html
2012-02-04 21:17:48 +01:00
# rewrite stuff
2011-09-05 19:05:40 +02:00
RewriteEngine on
2012-02-04 21:17:48 +01:00
# don't alienate people who use the old feed
2011-09-05 19:05:40 +02:00
RewriteRule ^feed/? /rss.xml
2012-02-04 21:17:48 +01:00
2012-04-16 19:28:41 +02:00
# redirect old wordpress links
2012-04-21 13:56:16 +02:00
<% @site.slug_items.each do |item| %>RewriteRule ^<%= item[:slug].chop %> <%= item.identifier%> [R=301]
2012-04-16 19:28:41 +02:00
<% end %>
2012-06-23 20:20:36 +02:00
# redirect sites if they moved
<% @site.moved_pages.each do |from, to| %>RewriteRule ^<%= from %> <%= to %> [R=301]
<% end %>
2012-02-04 21:17:48 +01:00
# serve gzipped files if available
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME} !\.gz$
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [L]