CFWheels 网站根目录的不同重写模式 [英] Different rewrite mode for CFWheels website root

查看:27
本文介绍了CFWheels 网站根目录的不同重写模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要有关研究以下问题的建议.

I need an advice on researching the following issue.

Wheels 网站已经配置了 set(URLRewriting="On"),除了根页面外,一切看起来都很好.

Wheels website has set(URLRewriting="On") configured, everything looks fine except root page.

所有使用 linkTo 构建的链接看起来都像 website.tld/controller/action.

All links built with linkTo look like website.tld/controller/action.

但是在/模式下切换"到部分和链接看起来像 website.tld/index.cfm/controller/action.有趣的是,如果显式访问默认路由页面(在本例中为/pages/index)——URL 构建正确.

But on a / mode "switched" into the partial and links look like website.tld/index.cfm/controller/action. Interestingly, if default route page accessed explicitly (/pages/index in this case) -- URLs built properly.

网站在 Tomcat 和 Ubuntu 下的 Apache2 中运行,标准 Wheels 重写规则直接在 vhost 配置中配置,作为 .htaccess 已知问题的解决方法.

Website is running in Tomcat with Apache2 under Ubuntu, standard Wheels rewriting rules configured directly in a vhost config, as a workaround to known issue with .htaccess.

从哪里开始?要检查哪些变量以及如何调试?

Where to start? What variables to check and how to debug this?

谢谢.

UPD 我现在只能看到,当直接访问默认操作时,调试输出中没有 Route: home.不确定如何使用此信息,我对 Wheels 的经验很少.

UPD All I can see for now is that when default action accessed directly there's no Route: home in the debug output. Not sure how to use this info, I have very small experience with Wheels.

推荐答案

由于 Chris Peters 没有创建答案,我会这样做而只是标记问题已解决.无论如何,一切都归于克里斯.

Since Chris Peters did not create the answer, I'll do this instead just to mark the question resolved. All glory to Chris, any way.

如果您不重写到 rewrite.cfm,Wheels 通常会忽略 set(urlRewriting="On").确保请求通过 rewrite.cfm 而不是 index.cfm

这意味着您需要检查有问题页面上的 CGI 范围并修复重写解决方法规则(我认为 Tomcat+CFWheels 的规则很少).

It means that you need to check the CGI scope on the problematic pages and fix the rewriting workaround rules (there are few of them for Tomcat+CFWheels, I think).

这篇关于CFWheels 网站根目录的不同重写模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆