This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
23 lines (19 loc) · 1.48 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
<ifModule mod_rewrite.c>
RewriteEngine On
# project/event/knowmore nodes for crawlers
RewriteCond %{HTTP_USER_AGENT} (^facebookexternalhit) [OR]
RewriteCond %{HTTP_USER_AGENT} (baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|Slackbot|Slack-ImgProxy|Slackbot-LinkExpanding|Site\ Analyzer|SiteAnalyzerBot|Viber|Whatsapp|Telegram) [OR]
RewriteCond %{HTTP_USER_AGENT} (Twitterbot|Pinterest|Google.*snippet|Google|Googlebot|mattermost-*)
RewriteRule ^(.*)/dha/(.*)/(.*)$ http://www.digital-humanities.at/snap.php?lang=$1&id=$3 [P]
# head pages for crawlers
RewriteCond %{HTTP_USER_AGENT} (^facebookexternalhit) [OR]
RewriteCond %{HTTP_USER_AGENT} (baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|Slackbot|Slack-ImgProxy|Slackbot-LinkExpanding|Site\ Analyzer|SiteAnalyzerBot|Viber|Whatsapp|Telegram) [OR]
RewriteCond %{HTTP_USER_AGENT} (Twitterbot|Pinterest|Google.*snippet|Google|Googlebot|mattermost-*)
RewriteRule ^(.*)/dha/(.*)$ http://www.digital-humanities.at/snap.php?lang=$1&id=$2 [P]
RewriteRule ^dha2016$ http://www.digital-humanities.at/en/dha/s-news/3rd-dha-conference-dha2016 [NE,R=301,L]
# Required to allow direct-linking of pages so they can be processed by Angular
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index
RewriteRule (.*) index.html [L]
</ifModule>