EllisLab text mark
Advanced Search
     
routing and pagination problem
Posted: 04 October 2012 01:39 PM   [ Ignore ]
Joined: 2012-08-24
2 posts

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:

$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:

$route[’(controller2/method2)’]=‘controller2/method2’;

 

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

how can i define pagination link in route.php when code1 is already define?