我正在使用codeigniter。我正在使用数据表检索数据。
在我的本地PC上运行正常。但在远程服务器上,它会导致404。 datatable生成的查询字符串太长,导致404。
如果我减小查询字符串的长度,则效果很好。
.htc访问内容
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 /index.php
有人有主意吗?
答案 0 :(得分:0)
问题不存在。它是托管我的应用程序的服务器。
它是IIS服务器默认情况下拒绝请求的查询字符串太多。
我必须制作web.config文件并更改请求限制参数
<security>
<requestFiltering>
<requestLimits maxQueryString="xxxx" />
</requestFiltering>
</security>
希望能帮助别人!