Welcome Guest, Not a member yet? Register   Sign In
Im just confused how to build this URL (easy question for you guys, I think)
#8

[eluser]TWP Marketing[/eluser]
Quote:...
Thanks for reply.
But I have another question about URL. Sorry if my issues was all about URL

When i typed my url for example and add another segment at the end of it which do not exist in my content, it should show an error 404 page. But instead it shows the page for the last valid segment in the URL.How could I fix that??.
If there may be another segment, which is optional, just parse it the same as the prior segment.
For a URL like this:
Code:
http://mydomain.com/infosystems/administration/user_management/some_var
The fourth segment "some_var" will be available as the second parameter of the controller function administration() which I have arbitrarily called "$something".
Code:
...
function administration($func="admin", $something="" ){
if( $func == "user_management" )
{
  if( $something != "" )
  {
    // process the "$something" var as necessary
    // for instance you code do show_404()
  }
  $this->user_management(); // call the user management method in this controller
  return; // leave, done with user_management function
}
// put the default administation stuff here
}

function user_management()
{
// do you user management stuff here
}
...


Messages In This Thread
Im just confused how to build this URL (easy question for you guys, I think) - by El Forum - 07-27-2012, 08:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB