ISAPI 重写 - 忽略子目录

发布于 2024-10-01 03:07:33 字数 682 浏览 0 评论 0原文

我有一个网站,我使用 ISAPI 过滤器强制从 URL 中删除 index.cfm(即 http ://www.site.com/index.cfm 变为 http://www.site.com/< /a>)。嗯,这对于大多数网站来说都很好,除了网站的密码保护区(不需要重写,因为网站的这一部分不会影响 SEO)。

根据我在网上阅读的内容,我需要设置一个重写条件,该条件将忽略删除 index.cfm 扩展名的重写语句。

因此,为了明确起见,我希望重写在 http://www.site.com/ 上正常运行但当用户导航到此处时则不然: http://www.site.com/workflow/

任何帮助将不胜感激。谢谢。

编辑:我尝试了 Cade 推荐的规则,但当我尝试导航到工作流子目录时,index.cfm 似乎仍然被删除。由于某种原因,删除了 index.cfm 导致无法登录工作流门户。有什么建议吗??

谢谢!

I have a site where I am using an ISAPI filter to force the removal of index.cfm from the URL (i.e. http://www.site.com/index.cfm becomes http://www.site.com/). Well this is fine for most of the site except for a password protected area of the site (which does not need the rewrite, as this part of the site does not affect SEO).

From what I have read online I need to set up a rewrite condition which will ignore the rewrite statement which removes the index.cfm extension.

So just to be clear I want the rewrite to operate as normal on http://www.site.com/ but not when the user navigates here: http://www.site.com/workflow/

Any help would be greatly appreciated. Thank you.

EDIT: I tried the rule that Cade recommended, but it seems that index.cfm is still being removed when I try to navigate to the workflow sub directory. For some reason having the index.cfm being removed is making it impossible to log into the workflow portal. Any suggestions??

Thanks!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一人独醉 2024-10-08 03:07:33

ISAPI 重写 3 规则:RewriteRule ^workflow/(.*)$ /workflow/$1 [NC,L]

ISAPI 重写 2 规则:RewriteRule /workflow/(.*) /workflow/$1 [NC,L]

这会将工作流的任何请求直接传递到工作流文件夹。您可以将其放在从 URL 中删除 index.cfm 的重写规则之前。

ISAPI Rewrite 3 Rule: RewriteRule ^workflow/(.*)$ /workflow/$1 [NC,L]

ISAPI Rewrite 2 Rule: RewriteRule /workflow/(.*) /workflow/$1 [NC,L]

This will pass any requests for workflow directly through to the workflow folder. You would place this before your rewrite rule that removes index.cfm from the URL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文