-1

.htaccess または CI ルーティングを使用して Web サイトの特定の URL を書き換える方法

http://www.domain.com/user_controller/newfunction/username

なので

http://www.domain.com/ユーザー名

4

3 に答える 3

1
$route['/(:any)'] = "/user_controller/newfunction/$1";

またはhtaccessを試してください

RewriteEngine On
RewriteRule ^([^/]*)$ /user_controller/newfunction/$1 [L]
于 2012-12-04T11:04:02.293 に答える
0

/application/config/routes.php

$route['/all/other/routes/must/come/first!'] = "wherever/you/want";
$route['/(:any)'] = "/user_controller/newfunction/$1";
于 2012-12-04T11:04:47.157 に答える