Skip to main content
August 19, 2010
Question

Problem with CF9, Apache2 and aliases (mod_alias)

  • August 19, 2010
  • 1 reply
  • 1536 views

Hi

We're running ColdFusion9 with Apache 2 and want to access .cfm files without specifying any extensions. This used to work with CF5 (don't ask... ^^) and Apache1.3.x.

Here's a simple example with two aliases for accessing the administrator pages of ColdFusion:

Entries in httpd.conf:

    Alias /Admin        "/usr/local/httpd-2.2.16/htdocs/CFIDE/administrator/index.cfm"

    Alias /Admin.cfm    "/usr/local/httpd-2.2.16/htdocs/CFIDE/administrator/index.cfm"

When accessing the page with http://localhost/Admin.cfm, everything works fine.

When accessing the page with http://localhost/Admin though, we get 403 (Forbidden), and that's it.

It seems, that JRun looks at the extension of the original request (that is, before the alias mapping takes place) in order to find out whether it has to forward the request to the CF server or not. But we can't specify a nonexisting extension to the AddHandler-clause.

Is there any way make this work?

Using redirects instead of aliases works, but a redirect involves the client which is inacceptable since it would double the #requests.

Kind regards!

Daniel

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    August 19, 2010
    August 19, 2010

    Hm.. your reply seems to be empty, mack_! I hope this doesn't mean that it's not possivle.

    Regards

    Daniel

    Participating Frequently
    August 19, 2010

    Let's trying again:

    You can use mod_rewrite to rewrite the URL internally, without

    generating an external redirect:

    RewriteRule ^Admin$ Admin.cfm

    --

    Mack