Apache无法将用户代理重定向到Rendertron

发布于 2025-01-23 12:29:08 字数 608 浏览 2 评论 0原文

我在Apache中部署一个页面应用程序,并寻找使用RenderTron为用户代理渲染静态页面,但似乎Apache未能将用户代理重定向到特定的Rendertron。 Rendertron和Proxy_http_module和rewrite_module都可以正常工作。

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} bot|googlebot|bingbot|yandex|baiduspider|SkypeUriPreview|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|showyoubot|outbrain|pinterest\0.|developers.google.com/+/web/snippet|slackbot|vkshare|redditbot|applebot|whatsapp|TelegramBot|w3c_validator|rsiteauditor|sitecheckerbotcrawler|seositecheckup|seobilitybot
RewriteRule ^(.*)$ http://x.x.x.x:3000/render/https://exmaple.com/$1 [P,L]

I deploy a single page application in apache and looking for using rendertron to render a static page for the user agent, but seems the apache failed to redirect the user agent to the specific rendertron. Rendertron is working as well as the proxy_http_module and rewrite_module were already enabled.

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} bot|googlebot|bingbot|yandex|baiduspider|SkypeUriPreview|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|showyoubot|outbrain|pinterest\0.|developers.google.com/+/web/snippet|slackbot|vkshare|redditbot|applebot|whatsapp|TelegramBot|w3c_validator|rsiteauditor|sitecheckerbotcrawler|seositecheckup|seobilitybot
RewriteRule ^(.*)$ http://x.x.x.x:3000/render/https://exmaple.com/$1 [P,L]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文