Jump to content

SEO friendly URL pass parameter to controller via URI


fdib

Recommended Posts

Hi, 

I've created a custom module with a controller that I would like it to read the last segment of the URL as variables. 
 
Without SEO friendly URL it will look like this:
mysite.com/module/modulename/controller?paremeter=something

But I want it to look like this:

mysite.com/module/modulename/controller/parameter
How can I do this on PS 1.6 
 
I've tried working with the SCHEMA of URLS but I just can't seem to understand how it works. I can't even manage to make URL work with or without a slash at the end. (It's either one or the other). 

I've hacked (just for testing) the Dispatcher file but can't make it work either. 
 
So I'm just giving up and asking for help. 
 
Any ideas?
 
For example in codeigniter it will be something like this:
class MyModuleController extends CI_Controller {

        public function shoes($var) //this $var is comes from the last URI segment 
        {
           echo $var
        }
}
 

 

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...