I have a problem where, when submitting my form, it seems to ignore my routing and redirects me to the Home instead.
In my main.php routing:
'<language\w+>/profile/<slug:[\w\-]+>' => 'profile/index',
'<language\w+>/<action:\w+>' => 'site/index',
My form:
<form action="<?php echo Yii::app()->getBaseUrl()."/".Yii::app()->language;?>
/profile/calendar" method="post">
Which outputs to
<form action="/domainname/nl/profile/calendar" method="post">
Note: domainname is there because I'm testing this on localhost.
However, when pressing the submit button it forwards me to the home instead of the correct page. Simply visiting /domainname/nl/profile/calendar
in the browser does work and gives me the correct controller. I don't know why it isn't working in the form.
In a different form on the same website, I have the following, which again does work fine for the routing:
<form action="/domainname/nl/profile/info" method="post">
The difference between these 2 forms is that the last one is created through CActiveForm widget and the first one isn't.