.htaccess 842 Bytes
Newer Older
1
RewriteEngine on
2
RewriteBase /
3

4 5
RewriteCond %{REQUEST_FILENAME} !-f

6 7 8 9
# redirect a call to doi.esrf.fr/DOIprefix/DOIsuffix to doi.esrf.fr/index.html?DOI=DOIprefix/DOIsuffix
RewriteCond %{REQUEST_URI} !(\.js)
RewriteCond %{REQUEST_URI} !(\.css)
RewriteCond %{REQUEST_URI} !(images/)
10 11

RewriteCond %{HTTP_USER_AGENT} !googlebot [NC]
12
RewriteRule  "/(.+)$"   "index.html?DOI=$1"    [NC,L]
13

14
# When a googlebot is crawling around
15 16
# P requires that the apache libs 'proxy_http' and 'proxy' is loaded 
RewriteCond %{HTTP_USER_AGENT} googlebot [NC]
17 18
RewriteCond %{REQUEST_FILENAME} !-f

19 20
# RewriteRule "(.+)$" "http://localhost:3002/render/http://%{HTTP_HOST}/$1" [P,L]
# RewriteRule "(.+)$" "https://render-tron.appspot.com/render/http://%{HTTP_HOST}/$1" [P,L]  
21

22
RewriteRule "(.+)$" "http://render-tron.appspot.com/render/http://doi.esrf.fr/$1" [P,L]