0

这是交易:我有一个用户登录的登录表单。如果验证通过,他们将被重定向到

example.com/members/landing

我怎样才能将其更改为仅example.com/landing. 有没有办法改变浏览器上显示给用户的url,而在后面,form_open 有不同的调用方法

例如:如上所述,代码形式为

<?php echo form_open(members/landing); ?>

但浏览器必须显示登陆或任何东西....

4

2 回答 2

1

在 config/routes.php 中:

$route['landing'] = '/members/landing';

这样做是将任何请求发送example.com/landingexample.com/members/landing控制器。那么你的表格:

<?php echo form_open('/landing'); ?>

应该按预期工作。

于 2013-03-15T14:54:36.237 回答
0

您正在使用 codeigniter,编辑您的 routes.php 并更改默认控制器;或者如果您只需要显示自定义 URL,您可以使用 .htaccess 文件。

于 2013-03-15T12:34:22.797 回答