10-04-2012, 08:31 AM
[eluser]Unknown[/eluser]
Hay everyone,
my real link is:
LINK 1: http://www.example.com/controller1/method1/this-is-a-link
but i want this link
LINK 2: http://www.example.com/this-is-a-link
For this LINK 2: i put this code in route.php
code 1:
And I am successfully get LINK 2:, it works well
But my main problem is when i add code 1: All of my URI effected AND every link has to be manually edit in route.php
suppose my another link is
LINK 3: http://www.example.com/controller2/method2/this-is-another-link
but i want this link
LINK 4: http://www.example.com/this-is-another-link
For this LINK 4: put this code in route.php
code 2:
the pagination problem is when i enter any page how can i define routing if CODE 1
is already declare
suppose, i want paginate home.php
the url look like
http://www.example.com/home/1
http://www.example.com/home/2
http://www.example.com/home/3 etc
if the code1 do not use i can use any link without routing
but i need link2
Hay everyone,
my real link is:
LINK 1: http://www.example.com/controller1/method1/this-is-a-link
but i want this link
LINK 2: http://www.example.com/this-is-a-link
For this LINK 2: i put this code in route.php
code 1:
Code:
$route['(:any)']='controller1/method1/$1';
And I am successfully get LINK 2:, it works well
But my main problem is when i add code 1: All of my URI effected AND every link has to be manually edit in route.php
suppose my another link is
LINK 3: http://www.example.com/controller2/method2/this-is-another-link
but i want this link
LINK 4: http://www.example.com/this-is-another-link
For this LINK 4: put this code in route.php
code 2:
Code:
$route['(controller2/method2)']='controller2/method2';
Quote:it is disgusting when, every link explain with route.php
the pagination problem is when i enter any page how can i define routing if CODE 1
is already declare
suppose, i want paginate home.php
the url look like
http://www.example.com/home/1
http://www.example.com/home/2
http://www.example.com/home/3 etc
if the code1 do not use i can use any link without routing
but i need link2
Quote:how can i define pagination link in route.php when code1 is already define?