I need language appear in the url for multilanguage website. Here is my code:

```
public function changeLang($lang_code){
                    $this->session->set_userdata('language',$lang_code);
                    redirect($_SERVER['HTTP_REFERER']."".$this->language);
                }

```

When i write this way another language appears in url. For example, whatever language i chose it gives for english <http://localhost/new/en>. or it increments <http://localhost/new/enen>. Thanks in advance.