CodeIgniter Forums
Problems with a function - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Problems with a function (/showthread.php?tid=15124)



Problems with a function - El Forum - 01-27-2009

[eluser]kripton11235[/eluser]
All right guys? When i try to load the function "cat" of my main controller("welcome") is displayed the following error message:The requested URL /CodeIgniter/welcome/cat/7 was not found on this server. How can i fix this?
Here are the codes of the function "cat" and my view.
function cat: http://pastebin.com/m119d4b61
view: http://pastebin.com/m4da81703


Problems with a function - El Forum - 01-27-2009

[eluser]Rey Philip Regis[/eluser]
Based from my observation your using clean url's right? My first question to you is, have you configured your CI to use clean url's? Cause if not using http://your_host/CodeIgniter/welcome/cat/7 will not run and will have errors just like what you've posted. If you will not use clean url's you should type this to your address bar so you could run your program http://your_host/CodeIgniter/index.php/welcome/cat/7

Try that and most likely your program will run.


Problems with a function - El Forum - 01-28-2009

[eluser]kripton11235[/eluser]
Thanks Rey, this is precisely the problem, putting index.php in my url everything works perfectly. Set up .htaccess as follows:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

What more can I do?


Problems with a function - El Forum - 01-29-2009

[eluser]kripton11235[/eluser]
up