【发布时间】:2013-01-23 13:16:01
【问题描述】:
我有以下网址
example.com/show.php?xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
我想将它重定向到控制器测试操作重定向。 我如何通过 cake php 路由或通过 htaccess 来实现这一点。
【问题讨论】:
标签: php .htaccess cakephp routing
我有以下网址
example.com/show.php?xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
我想将它重定向到控制器测试操作重定向。 我如何通过 cake php 路由或通过 htaccess 来实现这一点。
【问题讨论】:
标签: php .htaccess cakephp routing
您可以在app/Config/routes.php 文件中为此输入一个简单的路由:
Router::connect('/show.php', array('controller' => 'tests', 'action' => 'redirs'));
如果需要,您可以在您的操作中处理查询字符串中传递的任何内容。
【讨论】: