Manoaj J Rathore
Manoaj J Rathore

Reputation: 127

Routing in cake php

i am having following url

example.com/show.php?xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I want to redirect it to the controller tests action redirs. How can i achieve this with cake php routing or via htaccess.

Upvotes: 0

Views: 158

Answers (1)

Oldskool
Oldskool

Reputation: 34877

You can just enter a plain route for this in the app/Config/routes.php file:

Router::connect('/show.php', array('controller' => 'tests', 'action' => 'redirs'));

Within your action you can process whatever is passed in the querystring, if there is a need for that.

Upvotes: 1

Related Questions