我想从
重定向URlhttp://www.mydomain.com/b2b/testarab
要
http://www.mydomain.com/b2b/index.php/business/show/testarab
我也设置了
$config['index_page'] = '';
我的.htaccess文件是
RewriteEngine on
php_value max_file_uploads 30
RewriteBase /b2b
RewriteCond %{REQUEST_URI} \s
RewriteRule ^(home.*|buyers.*|sellers.*|companies.*|mall.*|category.*|product_details.*|contact_now.*|join.*|login.*|myprofile.*|dashboard.*|buy_sell_items.*|trade.*|media.*|myadvertise.*|mycontacts.*|myemail.*|myhotel.*|mymedia.*|payment.*|tradeshows.*|tradeshow_details.*|search_tradeshows.*|business.*)$ index.php/$1 [NC,L,QSA]
RewriteRule ^([a-zA-Z0-9._-\s]+)$ index.php/business/show/$1 [NC,L,QSA]
在这个文件中,第一个RewriteRule正在运行.. 第二个不起作用..
答案 0 :(得分:0)
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
将变量设置为空,如下所示。
$config['index_page'] = '';
尝试逐个替换以下变量('AUTO','PATH_INFO','QUERY_STRING','REQUEST_URI'和'ORIG_PATH_INFO')
$config['uri_protocol'] = 'AUTO';