【发布时间】:2018-09-04 15:59:12
【问题描述】:
我们有一个网站正在迁移到 Google App Engine Flex Env。网站上的大多数页面都重定向到某个地方,但仍有一些页面可以访问。
这是我们 LAMP 系统上的 htaccess 文件
RewriteEngine on
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js)$
RewriteCond %{REQUEST_URI} !^/About/.*$
RewriteCond %{REQUEST_URI} !^/Services/.*$
RewriteCond %{REQUEST_URI} !^/Newsroom/.*$
RewriteCond %{REQUEST_URI} !^/Resources/.*$
RewriteCond %{REQUEST_URI} !^/Internal/.*$
RewriteCond %{REQUEST_URI} !^/Contact/.*$
RewriteCond %{REQUEST_URI} !^/Training/.*$
RewriteCond %{REQUEST_URI} !^/content/.*$
RewriteCond %{REQUEST_URI} !^/videos/.*$
RewriteCond %{REQUEST_URI} !^/app/auth/login.*$
RewriteRule (.*) https://example.com [R=301,L]
RewriteCond %{HTTP_HOST} ^site\.com$
RewriteRule ^app/auth/login$ https://another.site.com/? [R=301,L]
是否可以在 app.yaml 中使用 url 处理程序(如 htaccess 的 reg 表达式)拥有此逻辑,并将其路由到硬编码的 URL 而不是指向脚本?
【问题讨论】:
标签: php google-app-engine