Welcome Guest, Not a member yet? Register   Sign In
Remove segment from url in multi language site
#3

(This post was last modified: 02-20-2021, 04:19 AM by demyr.)

(02-19-2021, 12:00 PM)eleumas Wrote: Hi! i have this code...

View:
PHP Code:
<a href="<?php echo base_url('it/article/'.$a['slug']);?>">Blog Title</a


Routes:
PHP Code:
$routes->add('(:any)/it/article''It/Main::article/$1');
$routes->get('{locale}/article/(:any)''It/Main::article'); 

..and this link: www.mysite.com/it/article/title

I would like remove the word article form the link. My new link should be: www.mysite.com/it/slug

Thanks for the support.

using only :any() should meet your needs. Or try (:segment)
Reply


Messages In This Thread
RE: Remove segment from url in multi language site - by demyr - 02-20-2021, 04:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB