Problem with URI segment length |
[eluser]afshin[/eluser]
Hi there. I have been dealing with a code to retrieve some data from database using URI segment, but I faced a problem. Of course, everything is okay until the the segment length is less than 56 characters. This is what I have used in my model : Code: function view_news() For example, if the link is: http://example.com/news/10/this-is-what-...n-this-uri it will retrieve data from database where the Id is 10, and the other segment is just for more information about the news and has nothing to do with the query But, the problem is that when the modifier segment(3rd segment) is more than 56 characters, I get a browser(chrome) error which says : Quote:Server error This is what I have in my routes.php file : Code: $route['news/(:any)'] = "main/news"; and this is my .htaccess file : Quote:<IfModule mod_rewrite.c> I have no problem in localhost, and the problem is just in server. I don't really know what the problem is ! Any suggestions?!
[eluser]Jason Stanley[/eluser]
Do you have error reporting on? Are you logging errors?
[eluser]afshin[/eluser]
The problem was with the default .htaccess file. I have changed it to Quote:# Deny OR Allow Folder Indexes. Now the problem of the length has been solved |
Welcome Guest, Not a member yet? Register Sign In |