0

我想从

http://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 正在工作..第二个不工作..

4

1 回答 1

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';
于 2013-01-16T13:49:36.100 回答