Coldbox Module SES urls

Hi,

I am using ColdBox 3.5beta.

After setting up IIS url rewrite, I am able to run coldbox application on web root (e.g. http://localhost:84/General)

Now I’ve created a module and added following line in Routes.cfm

addModuleRoutes(pattern="/mymodule",module=“mymodule”);

Also in ModuleConfig file, I have rout settings as follow:

routes = [
{pattern="/", handler=“mymodulehandler”,action=“index”}
];

this way, I am able to use the module by using following url:

http://localhost:84/mymodule:mymodulehandler/

But how I can I make to:

http://localhost:84/mymodule/mymodulehandler/

or
http://localhost:84/mymodule/mymodulehandler/myaction

How can I apply SES on that?

To apply and remove index.cfm from url, I followed steps from here.
Do I also need to create more rules for each module?

What is the entry point of the module?

If you remove the

addModuleRoutes(pattern="/mymodule",module=“mymodule”);

and make the entry point of your module

this.entryPoint = " mymodule";

then you should be able to do thinks like

http://localhost:84/mymodule/mymodulehandler/

or

http://localhost:84/mymodule/mymodulehandler/myaction

Thanks,

Curt Gratz

You do not need this

addModuleRoutes(pattern="/mymodule",module=“mymodule”);

If you setup the stuff in your modules config.

First:

I removed the line from Routes.cfm

addModuleRoutes(pattern="/mymodule",module=“mymodule”);

My module entry point was:

this.entryPoint = " mymodule:mymodulehandler";

And I changed to simply “mymodule”.

But I still on get success.
http://localhost:84/mymodule/mymodulehandler/

Above URL, shows the default (General/index) page.

Thanks for the reply.

After making the changes you have done a reinit on the application?

Yes, I double check the changes and also reinit application.

On the Home page, module shows with link:

http://localhost:84/mymodule

But When I click on it.
It redirects to :

http://localhost:84/mymodule:mymodulehandler

Module works fine, But url is not good!
It should be http://localhost:84/mymodule/mymodulehandler

The that would be what ever you are using to create the link.

Problem is still open. Can you please help me out?
Thanks…

Do you have this route setup in your module config routes section?

{pattern="/:handler/:action?"}

If not, you will need it.

Curt

Many thanks… that solves the issue!