Mercurial > hg > ywww
annotate index.php @ 19:84a412b8122c
try to protect against a range of missing info
author | Charlie Root |
---|---|
date | Thu, 30 Aug 2018 17:18:12 -0400 |
parents | 093e42d5a874 |
children | 7679346abfdb |
rev | line source |
---|---|
0 | 1 <?php |
16
093e42d5a874
minor tidy-ups on new-server install
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
2 $country_code = $_SERVER["GEOIP_COUNTRY_CODE"]; |
0 | 3 switch($country_code){ |
4 /* case "CA": | |
5 Header( "HTTP/1.1 301 Moved Permanently" ); | |
6 Header ("Location: http://www.yournextread.com/ca/" ); | |
7 break; | |
8 case "DE": | |
9 Header( "HTTP/1.1 301 Moved Permanently" ); | |
10 Header ("Location: http://www.yournextread.com/de/" ); | |
11 break; | |
12 case "FR": | |
13 Header( "HTTP/1.1 301 Moved Permanently" ); | |
14 Header ("Location: http://www.yournextread.com/fr/" ); | |
15 break; | |
16 case "GB": | |
17 Header( "HTTP/1.1 301 Moved Permanently" ); | |
18 Header ("Location: http://www.yournextread.com/uk/" ); | |
19 break; | |
20 case "US": | |
21 Header( "HTTP/1.1 301 Moved Permanently" ); | |
22 Header ("Location: http://www.yournextread.com/us/" ); | |
23 break; */ | |
24 default: | |
25 Header( "HTTP/1.1 301 Moved Permanently" ); | |
26 Header ("Location: http://www.yournextread.com/us/" ); | |
27 break; | |
28 } | |
29 ?> | |
30 <html> | |
31 <head> | |
32 <title>YourNextRead: Book Recommendations</title> | |
33 | |
34 <META NAME="Description" CONTENT="YourNextRead recommends your next book. YourNextRead provides a book recommendation system showing aggregated book reviews, updated by real peoples opinions, in a simple visual map, helping you to decide 'What Should I Read Next?'. Perfect for both bookworms and casual readers!"> | |
35 <meta name="google-site-verification" content="0XCtbGM_bvOH363P2XE6DVjh-APTICOREquY8F38T84" /> | |
36 </HEAD> | |
37 <body> | |
19 | 38 <script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=322bafc0-69fa-4664-8e1c-0b9159259748"></script> |
0 | 39 </body> |
40 |