custom redirect not working after hosting move

terrywest 03 Mar, 2012
Hi

I have a very simple form setup with a single text input, and this custom redirect event:

<?php
$mainframe =& JFactory::getApplication();
$mainframe->redirect('http://www.mywebsite.com/'.$form->data['countryname']');
?>

Everything was working fine until I moved the site to a new hosting environment. Backed up with Akeeba and moved accordingly, now rather than redirecting I get the following in the page URL:

?chronoform=countryselect2&event=submit

I have double checked all the settings and duplicated the form without finding a solution. My new hosting should be no different from the old either.

Whats going on here, where should I be looking?

cheers
GreyHead 03 Mar, 2012
Hi terry,

I'd guess that your redirect isn't working (there's an extra ' near the end) and that you are seeing the standard ChonoForms on submit url.

Bob
terrywest 03 Mar, 2012
Hi Bob,

Yes that was the source of the problem, strange it only showed itself once I moved the site!

I tried removing and adding ' & " without success and ended up with the following fix.


<?php
$mainframe =& JFactory::getApplication();
$url = "http://www.anotherwebsite.com/" . $form->data['countryname'];
$mainframe->redirect($url);
?>


Many thanks
This topic is locked and no more replies can be posted.