I'm currently using HMVC with code igniter (i'm new to this), and I am trying to get a better understanding as how to best structure the urls for seo and best practice.
In an example I have a module Users (with mvc folders), one of the views is a login form:
<?php
echo form_open('user/submit');
echo validation_errors();
echo "<p>Email: ";
echo form_input('email');
echo "</p>";
echo "<p>Password: ";
echo form_password('password');
echo "</p>";
echo "<p>";
echo form_submit('login_submit', 'login');
echo "</p>";
echo form_close();
?>
and the controller contains methods:
function login() {
$data['view_file'] = "login_form";
$this->load->module('template');
$this->template->generic($data);
}
function submit(){
$this->load->library('form_validation');
$this->form_validation->set_rules('email', 'Email', 'required|xss_clean|valid_email');
$this->form_validation->set_rules('password', 'Password', 'required|xss_clean');
if ($this->form_validation->run($this) == FALSE){
$this->login();
} else {
echo "Success";
}
}
Now to access the form you go to the url:
http://somesite/users/login but when you click submit and the login has failed the user is redirected back to url: http://somesite/users/submit, how would this affect seo as the login form is accessible at both urls and what is best practice for this scenario?
Thanks