Welcome Guest, Not a member yet? Register   Sign In
URl
#1

same page is opening if i add the unwanted text after Slash for example
In this Page www.example/kb/article/mac-data/
or in this Page www.example/kb/article/mac-data/72riwgffffg
Reply
#2

Sounds like a routing problem. Are you using any custom routes?
Reply
#3

(This post was last modified: 03-24-2015, 04:05 AM by Avenirer. Edit Reason: additional info... )

And this is not normal?

You can put something like

PHP Code:
public function article ($param_one$param_two NULL)
{
 
 if(!is_null($param_two))
 
 {
 
   //do whatever redirect you want
 
 }
 
 // else do what you need to do


Or you can simply find out if the number of parameters are bigger than what you need with func_num_args().
Reply
#4

CI doesn't know how many segments a controller is SUPPOSED to respond to. It's looking for the controller/method and passing anything extra to the method (depending on how you set your method up). As suggested, if you don't want it to respond if it has like 3 segments, you need to check for that and issue an error or show_404()
Reply




Theme © iAndrew 2016 - Forum software by © MyBB