-1

I'm using a licensed cakephp script where appcontroller.php, bootstrap.php, and most of the core files are encrypted.

How do I change the url slug http://mydomain.com/property/cool-activity to http://mydomain.com/activity/cool-activity without affecting any other code?

There are many files and code that are named property or properties including a PropertiesController and PropertyUsersController.

The "cool-activity" slug was created by adding a new property listing "Cool Activity" and I know that to change the slug "cool-activity" can be done in the mysql database.

1 Answers1

0

Your problem seems to be related to routing and is a configuration issue.

First you have to identify the corresponding controller and action for the /property/ part of your URL. Do this by searching the routes.php for statement like:

Router::connect('/property/*', array('controller' => 'XYZ', 'action' => 'XYZ'));

If you have found this statement change the '/property/*' to '/activity/*'.

I hope this solves your issue. If not a look in the cookbook might help!

larsbe
  • 397
  • 2
  • 10
  • Thanks! I see this would be the best way to do it. However, my App/Controller/AppController.php is encrypted, and I think there are set locks to prevent some changes. Is there a workaround to this? – user3577984 May 04 '14 at 06:58