【发布时间】:2011-10-11 10:54:47
【问题描述】:
在我的项目中,我需要查询字符串功能和分段数组功能。因为某些返回 url 是查询字符串形式。 我进行了以下更改,但没有成功。
我的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]
有没有办法只在任何特定页面中设置查询字符串格式?或者有什么办法可以解决这个问题?
【问题讨论】:
-
哪些网址采用这种形式?网站内部 URL 或来自其他来源的 URL(例如 Paypal url,例如)
-
@Damien Pirsy : dev3.tec.in/test/order/…
-
@Damien Prisy : 当我启用查询字符串功能时,我的 url 看起来像 dev3.dec.in/test/?home/index/book
标签: php .htaccess codeigniter