繁体   English   中英

将版本更改为2.1.1后,.htaccess文件在codeigniter中不起作用

[英].htaccess file not working in codeigniter after change the version to 2.1.1

我想从

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在工作。

.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';

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM