Skip to main content
Participating Frequently
October 19, 2009
Question

I'm finding that CF9 doesn't redirect accurately on pages with hyphen in name

  • October 19, 2009
  • 1 reply
  • 754 views

I've just loaded CF9 on a development server and run some sites thatt worked perfectly on CF8.

Here's the problem:

<cflocation url="/users/listings/EditListing-2.cfm" addtoken="no" statuscode="301">               

<cfabort>

or

<cfheader statuscode="301" statustext="Moved Permanently">
<cfheader name="Location" value="/users/listings/EditListing-2.cfm">
<cfabort>

I've been using this page naming format for years in applications where you have step 1, step 2 and so on.

Running either of the above on a page under CF9 redirects to the site root or Index.cfm.

If I change the page name to EditListing2.cfm it works as intended.

Has anyone else had this probelem and do you have an easy fix, apart from renaming many many pages on over 45 websites?

Looking for any ideas.

Old Tony

    This topic has been closed for replies.

    1 reply

    Inspiring
    October 19, 2009

    Looking for any ideas.

    Check your virtual directories, because I think you might have something bung.  If I set up what you describe, it works fine for me.

    Can you browse to http://your.domain.here/users/listings/EditListing-2.cfm ?

    --

    Adam

    Old TonyAuthor
    Participating Frequently
    October 19, 2009

    No I'm very confident mapping to a virtual directory is not the cause. There are no virtual directory or mapping errors when the URL doesn't have a hyphenated name.

    I have a CF8 server set up identically and all the code works fine and I never get this problem. When I run any URL that leads to a cfm file with a hyphenated name on my CF9 installation, it defaults to the Index.cfm page. This is the release version of CF9.

    Inspiring
    October 19, 2009

    Hmmm.

    Well it's unlikely to be a behavioural thing that manifests differently from one CF install to another... there's not enough "moving parts", if you see what I mean.

    * What's your exact file structure (reflecting the calling code, and the location of the target file)?

    * What're the relevant virtual directories (humour me)?

    * Do you get the same behaviour using the JWS as opposed to Apache or IIS (which is it, btw?)

    * What sort of CF9 install is it (stand-alone / multi-server; standard  / dev / enterprise)?

    * As per my previous post... can you actually browse to the target file via the same URL you are specifying in your code?

    *  Have you put an HTTP sniffer into action to see if anything odd is happening @ HTTP level?

    * Anything unexpected in the web server, CF or JRun

    --

    Adam