.htaccess删除codeigniter url参数无法正常工作

时间:2017-01-19 02:24:14

标签: .htaccess codeigniter

我想尝试删除此示例中的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";

我的演示页面http://www.atline.com.tw/home/welcome/test/66

0 个答案:

没有答案