2011-10-11 143 views
0

在我的項目中,我需要查詢字符串功能和段數組功能。因爲某些返回網址位於查詢字符串表單中。 我做了以下更改,但沒有奏效。codeigniter查詢字符串和段一起

config.php模樣

$config['base_url'] = ''; 
$config['uri_protocol'] = 'PATH_INFO'; 
$config['enable_query_strings'] = TRUE; 

而且我.htaccess文件

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^$ /test/index.php [L] 
RewriteCond $1 !^(index\.php|resource|smsprinter|media|Scripts|system|public|upload|flash|css|js|pop-up|images|user_guide|scripts|robots\.txt|favicon\.ico) 
RewriteRule ^(.*)$ /test/index.php/$1 [L] 

有什麼辦法來設置僅任何特定頁面的查詢字符串格式?或者有什麼辦法可以解決這個問題?

+0

哪個url是這種形式?網站內部網址或來自其他來源的網址(如Paypal網址,例如。) –

+0

@Damien Pirsy:http://dev3.tec.in/test/order/smsprinter_test?a=AC001&o=N0001&ak=Accepted –

+0

@Damien Prisy:當我啓用我的查詢字符串功能時,我的網址看起來像http://dev3.dec.in/test/?home/index/book –

回答

0

我已經找出解決方案。 htaccess文件中沒有chage 但是在配置文件中有一些變化。 配置文件應該是 $ config ['base_url'] =''; $ config ['uri_protocol'] ='REQUEST_URI'; $ config ['enable_query_strings'] = FALSE;