This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set the root path (that's our variable not Nginx variable) to the landing page template file | |
set $rootPath "/map.php"; | |
set $crawlerPath "/map.html"; | |
if ($http_user_agent ~ "Ask Jeeves/Teoma|AdsBot-Google|exabot|Mediapartners-Google|GoogleToolbar|Google Web Preview|googlebot|yahoo|bingbot|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|msnbot|embedly|quora link preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator|WebCrawler|Screaming Frog SEO Spider|Slackbot-LinkExpanding|robot|crawler") { | |
set $isCrawler 1; | |
rewrite ^ $crawlerPath; | |
} | |
if ($isCrawler = 0) { | |
rewrite ^ $rootPath; |