« Return to Thread: Changing the default location for Friendly URLs

Re: Changing the default location for Friendly URLs

by James Buckingham-2 :: Rate this Message:

Reply to Author | View in Thread


Thanks Chris but that's not really what I was meaning.

The 404 is working fine because if I specify this address....

http://www.newsite.com/hr/index.cfm

....which doesn't exist on the new site, it redirects the user to
this.......

http://www.oldsite.com/hr/index.cfm

...if however I put in this address without the index.cfm ...

http://www.oldsite.com/hr/

FarCry is saying "I've got a friendly URL here so I need to look up
the objectID for this. Oh hang on this doesn't exist so I'm going to
send them to the home page".

What I want FarCry to do is send this user to the 404 instead of the
home page.

We've been doing some digging around today and found that the redirect
is actually being dealt with by the display.cfm in FarCry Core (tags/
navajo/display.cfm) at lines 75 / 76. It's hard coded to say go to the
home page via the value application.navid.home though. Ideally I'd
like to be able to repoint this to the 404.

From what I see I've got two choices

1) I repoint the index.cfm to read a custom display.cfm which is a
copy of the core and change the code I need. Downside to this is I've
then go to monitor any changes to the core as updates come out so
that's not ideal.

2) I manually create a FU for each of folders which doesn't exist on
the new site and tell it to redirect to the old. That's a lot of work
though and it means we'll have to remove them over time while they
migrate across.

Can anyone think of any other options?

Ideally it would be good to have an option in the Admin > Config >
Friendly URL config to be able to specify where FarCry redirects if a
friendly URL doesn't exist. Something to raise on the wish list?? :-)

Cheers,
James



On Jun 23, 12:37 pm, Chris Kent <mxdes...@...> wrote:

> James,
>
> Yes, you can override the default 404 page processing of redirecting
> to the home page by creating the following file /projects/
> yourprojectname/errors/404.cfm
>
> and place whatever code you need to handle 404's
>
> Chris.
>
> On Jun 23, 10:11 am, James Buckingham <Clarke...@...> wrote:
>
> > Hiya,
>
> > I'm working on a 404 error page for our new page. The job of the 404
> > is to first check our old sites ( running on separate domains) to see
> > if the page exists there and if it doesn't then throw a "Page not
> > Found" page.
>
> > It seems to be working fine if I put in something specific like
> > this...
>
> > http:///www.myNewWebsiteDomain.com/hr/aboutus/page.cfm
>
> > ...however if I put in....
>
> >http://www.myNewWebsiteDomain.com/hr/aboutus/
>
> > It looks like the FarCry is grabbing it, checking the address against
> > its Friendly URLs ( /hr/aboutus/ ) not finding it and sending the user
> > to the home page of our new site.
>
> > There are hundreds of these so I don't want to put them all into
> > FarCry manually. Is there anyway of customising the current Friendly
> > URL code to say I want to send them to the 404 rather than the home
> > page?
>
> > Cheers,
> > James
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: Changing the default location for Friendly URLs