簡體   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