CodeIgniter Forums
anchor() - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: anchor() (/showthread.php?tid=42744)



anchor() - El Forum - 06-17-2011

[eluser]Unknown[/eluser]
pls am finding it difficult using the anchor() method to call a controller function.each time i try using it,it gives me errors,more like it cannot locate the controller function that is suposed to call the page appended to the anchor() method.


anchor() - El Forum - 06-17-2011

[eluser]cideveloper[/eluser]
Post some code and you might get some help.

And please use the code tags.


anchor() - El Forum - 06-17-2011

[eluser]InsiteFX[/eluser]
Code:
anchor('Controller/method',,);

InsiteFX


anchor() - El Forum - 06-20-2011

[eluser]Unknown[/eluser]
turns out the problem is with my .htaccess file.when i use the "index.php", the anchor() method works properly.


anchor() - El Forum - 06-20-2011

[eluser]InsiteFX[/eluser]
Did you try adding this to your .htaccess file?
Code:
RewriteCond $1 !^(index\.php|assets|user_guide|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

Works for me!

InsiteFX