开发者

Codeigniter routes working with url indexes

开发者 https://www.devze.com 2023-03-09 12:31 出处:网络
How to rewrite the indexes of an url with the routes ? $route[\'name-(:num)\'] = name/name2?index1=$1;

How to rewrite the indexes of an url with the routes ?

$route['name-(:num)'] = name/name2?index1=$1;

And it isn't working.

$route['name-(:num)'] = name/name2/?index1=$1;

This is returned wrong sql query, becouse the index is not defined .

How to get the indexes 开发者_如何学C?


Not personally a 100% sure on how CodeIgniter url rewriting works, but if they use .htaccess to map all requests to a single PHP file you can't use regular $_GET variables via "?" anymore, you have to route them.

0

精彩评论

暂无评论...
验证码 换一张
取 消