• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Problem in Linking

#31
PFA.

(12-16-2014, 03:55 AM)Rufnex Wrote: Post also you db dump then i can install it for testing local.


Attached Files
.txt   codeigniter.txt (Size: 9.01 KB / Downloads: 160)
Reply

#32
Ok, your 1:1 files are working out of the box without any problem in my localhost on CI3. I must be a problem with your server or mod_rewrite.

Reply

#33
I am working on CI 2.2.0. Could it be the reason. Well do you have any idea about the problem with server or mod_rewrite.
Reply

#34
Ah, see youre prolem is the route.php it should contain for your example the following nothing else:

PHP Code:
$route['news/(:any)'] = 'news/view/$1';
$route['news'] = 'news';
$route['(:any)'] = 'pages/view/$1';
$route['default_controller'] = 'pages/view'

Reply

#35
Thanks a ton Rufnex. It's working now.

The Problem was
$route['(:any)'] = 'pages/view/$1';
$route['default_controller'] = 'pages/view';

I used it multiple times.

I would like to ask something as I am new to CI, why we use Rewrite Rules most of the time here.
Reply

#36
I have said it before and I will say it again the Route (:any) has to be the last route in the routes.php file, it is a catch all route.

Code:
$route['(:any)'] = 'pages/view/$1';

Any route after that route will never be seen!
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#37
Thanks for the valuable information InsiteFX.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.