|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Changing the default location for Friendly URLsHiya, 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 -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Changing the default location for Friendly URLsJames, 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 -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Changing the default location for Friendly URLsThanks 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 -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Changing the default location for Friendly URLsJames, You can put whatever code you require in the /projects/yourprojectname/ errors/404.cfm to handle any migration redirects required and this is run instead of the redirect the homepage. a very simple example would be that /projects/yourprojectname/errors/404.cfm just contains <cfsetting enablecfoutputonly="yes"> <cflocation url="/page-not-found" addtoken="no"> <cfsetting enablecfoutputonly="no"> It would be easy to build in some logging to the /projects/ yourprojectname/errors/404.cfm to record the missing URL and the http_referer and then report on the missing URLs that require action. I recently took a V3 site with "/go/..." type URLs to V5 and created all the old URLs as 301 redirect URLs for the new site. This was easy as it was a Farcry to Farcry site and the old content item objectID was used to match the old to new URLs. Chris. On Jun 23, 3:34 pm, James Buckingham <Clarke...@...> wrote: > 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 -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Changing the default location for Friendly URLsHi Chris, I did try creating a error/404.cfm in my project but it just ignored it and went straight to the home page :-(. It seems to be because there isn't an objectID associated with that url so the display.cfm is sending it to the home page. Cheers, James On Jun 23, 3:55 pm, Chris Kent <mxdes...@...> wrote: > James, > > You can put whatever code you require in the /projects/yourprojectname/ > errors/404.cfm to handle any migration redirects required and this is > run instead of the redirect the homepage. a very simple example would > be that /projects/yourprojectname/errors/404.cfm just contains > <cfsetting enablecfoutputonly="yes"> > <cflocation url="/page-not-found" addtoken="no"> > <cfsetting enablecfoutputonly="no"> > > It would be easy to build in some logging to the /projects/ > yourprojectname/errors/404.cfm to record the missing URL and the > http_referer and then report on the missing URLs that require action. > > I recently took a V3 site with "/go/..." type URLs to V5 and created > all the old URLs as 301 redirect URLs for the new site. This was easy > as it was a Farcry to Farcry site and the old content item objectID > was used to match the old to new URLs. > > Chris. > > On Jun 23, 3:34 pm, James Buckingham <Clarke...@...> wrote: > > > 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 -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Changing the default location for Friendly URLsJames, Make sure you place and name the file /projects/yourprojectname/errors/ 404.cfm Look at core/tags/navajo/display.cfm at line 67, you will see that if the /projects/yourprojectname/errors/404.cfm exists it is included, else the redirect to homepage happens. Chris. On Jun 23, 4:13 pm, James Buckingham <Clarke...@...> wrote: > Hi Chris, > > I did try creating a error/404.cfm in my project but it just ignored > it and went straight to the home page :-(. It seems to be because > there isn't an objectID associated with that url so the display.cfm is > sending it to the home page. > > Cheers, > James > > On Jun 23, 3:55 pm, Chris Kent <mxdes...@...> wrote: > > > James, > > > You can put whatever code you require in the /projects/yourprojectname/ > > errors/404.cfm to handle any migration redirects required and this is > > run instead of the redirect the homepage. a very simple example would > > be that /projects/yourprojectname/errors/404.cfm just contains > > <cfsetting enablecfoutputonly="yes"> > > <cflocation url="/page-not-found" addtoken="no"> > > <cfsetting enablecfoutputonly="no"> > > > It would be easy to build in some logging to the /projects/ > > yourprojectname/errors/404.cfm to record the missing URL and the > > http_referer and then report on the missing URLs that require action. > > > I recently took a V3 site with "/go/..." type URLs to V5 and created > > all the old URLs as 301 redirect URLs for the new site. This was easy > > as it was a Farcry to Farcry site and the old content item objectID > > was used to match the old to new URLs. > > > Chris. > > > On Jun 23, 3:34 pm, James Buckingham <Clarke...@...> wrote: > > > > 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 -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Changing the default location for Friendly URLsThanks Chris. Are you running 5-1-0? Line 67 on mine doesn't include this code, that's where the code is I'm referring to and is run when there isn't an objectID. The code you're referring to is further down the page and is wrapped in an if statement to be executed when there is an objectID. I'm still to test this but I think I've been a bit daft with this one. The display.cfm is a custom tag and accepts an argument of objectID - It should be the case that I can do some checks in the index.cfm before display it's executed. If there isn't an objectID then I can call some code and pass the user onto the 404 page :-). As I say that's a theory so I'm off to try it just now. Cheers again, James On Jun 23, 4:28 pm, Chris Kent <mxdes...@...> wrote: > James, > > Make sure you place and name the file /projects/yourprojectname/errors/ > 404.cfm > > Look at core/tags/navajo/display.cfm at line 67, you will see that if > the /projects/yourprojectname/errors/404.cfm exists it is included, > else the redirect to homepage happens. > > Chris. > > On Jun 23, 4:13 pm, James Buckingham <Clarke...@...> wrote: > > > Hi Chris, > > > I did try creating a error/404.cfm in my project but it just ignored > > it and went straight to the home page :-(. It seems to be because > > there isn't an objectID associated with that url so the display.cfm is > > sending it to the home page. > > > Cheers, > > James > > > On Jun 23, 3:55 pm, Chris Kent <mxdes...@...> wrote: > > > > James, > > > > You can put whatever code you require in the /projects/yourprojectname/ > > > errors/404.cfm to handle any migration redirects required and this is > > > run instead of the redirect the homepage. a very simple example would > > > be that /projects/yourprojectname/errors/404.cfm just contains > > > <cfsetting enablecfoutputonly="yes"> > > > <cflocation url="/page-not-found" addtoken="no"> > > > <cfsetting enablecfoutputonly="no"> > > > > It would be easy to build in some logging to the /projects/ > > > yourprojectname/errors/404.cfm to record the missing URL and the > > > http_referer and then report on the missing URLs that require action. > > > > I recently took a V3 site with "/go/..." type URLs to V5 and created > > > all the old URLs as 301 redirect URLs for the new site. This was easy > > > as it was a Farcry to Farcry site and the old content item objectID > > > was used to match the old to new URLs. > > > > Chris. > > > > On Jun 23, 3:34 pm, James Buckingham <Clarke...@...> wrote: > > > > > 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 -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Changing the default location for Friendly URLsJames, Yes, using 5-1-2 The site using the custom 404 page is http://www.kgsbikes.com/ any friendly URL that is not found redirect to http://www.kgsbikes.com/page-not-found, this is a standard html page set up in farcry. The custom 404.cfm just has <cflocation url="/page-not-found" addtoken="no"> Chris. On Jun 23, 8:53 pm, James Buckingham <Clarke...@...> wrote: > Thanks Chris. > > Are you running 5-1-0? Line 67 on mine doesn't include this code, > that's where the code is I'm referring to and is run when there isn't > an objectID. > > The code you're referring to is further down the page and is wrapped > in an if statement to be executed when there is an objectID. > > I'm still to test this but I think I've been a bit daft with this one. > > The display.cfm is a custom tag and accepts an argument of objectID - > It should be the case that I can do some checks in the index.cfm > before display it's executed. If there isn't an objectID then I can > call some code and pass the user onto the 404 page :-). > > As I say that's a theory so I'm off to try it just now. > > Cheers again, > James > > On Jun 23, 4:28 pm, Chris Kent <mxdes...@...> wrote: > > > James, > > > Make sure you place and name the file /projects/yourprojectname/errors/ > > 404.cfm > > > Look at core/tags/navajo/display.cfm at line 67, you will see that if > > the /projects/yourprojectname/errors/404.cfm exists it is included, > > else the redirect to homepage happens. > > > Chris. > > > On Jun 23, 4:13 pm, James Buckingham <Clarke...@...> wrote: > > > > Hi Chris, > > > > I did try creating a error/404.cfm in my project but it just ignored > > > it and went straight to the home page :-(. It seems to be because > > > there isn't an objectID associated with that url so the display.cfm is > > > sending it to the home page. > > > > Cheers, > > > James > > > > On Jun 23, 3:55 pm, Chris Kent <mxdes...@...> wrote: > > > > > James, > > > > > You can put whatever code you require in the /projects/yourprojectname/ > > > > errors/404.cfm to handle any migration redirects required and this is > > > > run instead of the redirect the homepage. a very simple example would > > > > be that /projects/yourprojectname/errors/404.cfm just contains > > > > <cfsetting enablecfoutputonly="yes"> > > > > <cflocation url="/page-not-found" addtoken="no"> > > > > <cfsetting enablecfoutputonly="no"> > > > > > It would be easy to build in some logging to the /projects/ > > > > yourprojectname/errors/404.cfm to record the missing URL and the > > > > http_referer and then report on the missing URLs that require action. > > > > > I recently took a V3 site with "/go/..." type URLs to V5 and created > > > > all the old URLs as 301 redirect URLs for the new site. This was easy > > > > as it was a Farcry to Farcry site and the old content item objectID > > > > was used to match the old to new URLs. > > > > > Chris. > > > > > On Jun 23, 3:34 pm, James Buckingham <Clarke...@...> wrote: > > > > > > 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 -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |