Php 查询字符串已停止工作
我有一个Codeigniter站点,它在centOS服务器上运行得非常好。但是从昨天开始,该站点无法检测到查询字符串,我得到了500个服务器错误。同样的代码在localhost上运行正常,但在CentOS服务器上给出了错误 我使用的是干净的URL,但对于Jquery的自动完成,我需要处理查询字符串。 这是我的问题 这是我的.htaccessPhp 查询字符串已停止工作,php,.htaccess,codeigniter,Php,.htaccess,Codeigniter,我有一个Codeigniter站点,它在centOS服务器上运行得非常好。但是从昨天开始,该站点无法检测到查询字符串,我得到了500个服务器错误。同样的代码在localhost上运行正常,但在CentOS服务器上给出了错误 我使用的是干净的URL,但对于Jquery的自动完成,我需要处理查询字符串。 这是我的问题 这是我的.htaccess RewriteEngine ON Rewritebase / RewriteCond $1 !^(index.php|assets|css|cache
RewriteEngine ON
Rewritebase /
RewriteCond $1 !^(index.php|assets|css|cache|images|flash|js|weather_images|user_images|new_images|crons|favicon\.ico|robots\.txt|system)
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^system/(.*)$ system/$1 [L]
#Rewirte images rules
RewriteRule ^images/(.*)$ assets/images/$1 [L]
RewriteRule ^css/(.*)$ assets/css/$1 [L]
RewriteRule ^js/(.*)$ assets/js/$1 [L]
RewriteRule ^user_images/(.*)$ assets/user_images/$1 [L]
RewriteRule ^flash/(.*)$ assets/flash/$1 [L]
RewriteRule ^new_images/(.*)$ assets/new_images/$1 [L]
RewriteRule ^weather_images/(.*)$ assets/weather_images/$1 [L]
我正在使用Codeigniter 1.7.1在我的配置中
$config['uri_protocol'] = "AUTO";
您是否在config/config.php中启用了此功能 $config['enable_query_strings']= 是的
如果需要查询字符串工作的唯一原因是使用jQuery的autocomplete函数,我相信有一种方法可以修改该函数以使用post而不是get
我不确定这对你是否有帮助,但我想我会把它扔出去。在我的Codeigniter项目中,我已经在一些领域成功地做到了这一点。500间隔错误通常会遇到错误的htaccess,请尝试通过确保没有服务器别名等来调试htaccess。。