-
Notifications
You must be signed in to change notification settings - Fork 7
/
.htaccess
36 lines (29 loc) · 1.29 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Options +FollowSymlinks
IndexIgnore *
DirectoryIndex index.html
ErrorDocument 404 /404.html
RewriteEngine on
# Move to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
# redirect book.
RewriteCond %{HTTP_HOST} ^book\.emmanuelbernard\.com$ [NC]
RewriteRule ^(.*)$ https://emmanuelbernard.com/books/hsia/ [R=301,L]
# redirect blog. atom feed to new feed
# redirect other blog. to /blog
RewriteCond %{HTTP_HOST} ^blog\.emmanuelbernard\.com$ [NC]
RewriteRule ^atom\.xml$ https://emmanuelbernard.com/blog/feed.atom [R=301,L]
RewriteCond %{HTTP_HOST} ^blog\.emmanuelbernard\.com$ [NC]
RewriteRule ^(.*)$ https://emmanuelbernard.com/blog/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www.emmanuelbernard.com$ [OR]
RewriteCond %{HTTP_HOST} ^emmanuelbernard.com$
RewriteRule ^books$ /books/hsia$1
RewriteRule ^books/$ /books/hsia$1
RewriteRule ^feed$ /blog/feed.atom
RewriteRule ^feed/$ /blog/feed.atom
# redirect the feedburner target with the real feed
RewriteRule ^blog/feed-private.atom/$ /blog/feed.atom
# OLD redirect feed to FeedBurner
# RewriteRule ^blog/feed.atom$ "http\:\/\/feeds\.feedburner\.com\/NoRelationTo" [R=302,L]
RewriteRule ^\@$ "https\:\/\/twitter\.com\/emmanuelbernard" [R=302,L]
#RewriteRule ^\+$ "https\:\/\/plus\.google\.com\/u\/0\/114288822031825705031" [R=302,L]