我想尝试删除此示例中的url参数: http:// mypoject / controller / method /?page = 1 => http:// mypoject / controller / method / page / 1 /但我的.htaccess无法完美执行
RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|images|swf|uploads|js|css|assets|robots\.txt|$)
RewriteRule ^(.*)$ /home/index.php/$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/home/{controller}/{method}/([a-zA-Z0-9_]+)/?$ /home/{controller}/{method}/?page=$1 [L,QSA]
设置请求路由
$route['{default_controller}/{default_method}/([a-zA-z0-9]+)'] = "{original_controller}/{original_method}/$1";