Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/273.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Codeigniter&;我的htaccess存在不允许的关键字符问题_Php_Security_.htaccess_Codeigniter - Fatal编程技术网

Php Codeigniter&;我的htaccess存在不允许的关键字符问题

Php Codeigniter&;我的htaccess存在不允许的关键字符问题,php,security,.htaccess,codeigniter,Php,Security,.htaccess,Codeigniter,我已经设置了htaccess规则(见下文) 我的目的是将以下任何链接重定向到site.com。问题是问号字符(?),因为这会导致Codeigniter框架中出现“不允许的关键字符”错误。我可以修改配置文件中允许的字符,但出于安全目的,不建议这样做 我想要重定向的链接如下所示 http://www.site.com/images/flash/main.swf?config=/flash/flash_output/133/location.htm 谁能建议一个不涉及的解决方法,或者这是唯一可行的选

我已经设置了htaccess规则(见下文)

我的目的是将以下任何链接重定向到site.com。问题是问号字符(?),因为这会导致Codeigniter框架中出现“不允许的关键字符”错误。我可以修改配置文件中允许的字符,但出于安全目的,不建议这样做

我想要重定向的链接如下所示

http://www.site.com/images/flash/main.swf?config=/flash/flash_output/133/location.htm

谁能建议一个不涉及的解决方法,或者这是唯一可行的选择吗?

我建议URL转义您的“config”参数。可能会混淆要访问哪个文件(在这种情况下,“?”字符位于意外的位置)。除此之外,这是一种良好的做法


命名文本框时,可能会使用空白

产生此类错误的不正确方法:

输入type=“text”id=“test\u text”name=“test\u text

正确的方法:

输入type=“text”id=“test\u text”name=“test\u text


即使
没有在允许的字符中列出,允许“?”也没有什么错。codeigniter没有在url中限制这一点。除非你在我的安装允许的地方做了改动
http://www.site.com/images/flash/main.swf?config=/flash/flash_output/133/location.htm