How to start a project with CodeIgniter? - 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: How to start a project with CodeIgniter? (/showthread.php?tid=48822) Pages:
1
2
|
How to start a project with CodeIgniter? - El Forum - 01-31-2012 [eluser]Mauricio de Abreu Antunes[/eluser] "CI assumes you already know how to program in PHP, use webservers, css, etc." My situtation is: http://localhost/percutz In percutz folder i have my .htaccess file with those configs. (not working) I removed index.php from config.php. I tried to access http://localhost/percutz/teste (i have a controller called teste) or http://localhost/index and the files were not found. I know what is Apache, .htaccess, rewrite rules, but how you can see, my configs are not working for a reason what i'm not seeing... Bye! How to start a project with CodeIgniter? - El Forum - 01-31-2012 [eluser]Unknown[/eluser] [quote author="Mauricio de Abreu Antunes" date="1328005710"]"CI assumes you already know how to program in PHP, use webservers, css, etc." My situtation is: http://localhost/percutz In percutz folder i have my .htaccess file with those configs. (not working) I removed index.php from config.php. I tried to access http://localhost/percutz/teste (i have a controller called teste) or http://localhost/index and the files were not found. I know what is Apache, .htaccess, rewrite rules, but how you can see, my configs are not working for a reason what i'm not seeing... Bye! [/quote] I wonder how you modify in your .htaccess file RewriteRule ^(.*)$ index.php/$1 [L] means all the stuffs are placed in the root folder. In your case, i think, you should change to RewriteRule ^(.*)$ /percutz/index.php/$1 [L] Hope that will help your How to start a project with CodeIgniter? - El Forum - 01-31-2012 [eluser]InsiteFX[/eluser] Maybe he needs to turn on mod_rewrite in the apache server - apache/conf/httpd.conf How to start a project with CodeIgniter? - El Forum - 01-31-2012 [eluser]Mauricio de Abreu Antunes[/eluser] [quote author="InsiteFX" date="1328040623"]Maybe he needs to turn on mod_rewrite in the apache server - apache/conf/httpd.conf [/quote] I turned it on How to start a project with CodeIgniter? - El Forum - 01-31-2012 [eluser]Mauricio de Abreu Antunes[/eluser] Thanks for all! I noticed that my .htaccess was not overwriting my httpd.conf. Sorry guys! But its ok now: RewriteEngine on RewriteBase / RewriteCond $1 !^(index\.php|css|js|images|robots.txt) RewriteRule ^(.*)$ /percutz/index.php?/$1 [L] It's my .htacces. Any suggestions? Ok, i have another issue now: when i go for http://localhost/percutz/index (like index.php), why am i getting Page Not Found? I need to go http://localhost/percutz for access to my new "home" and not localhost/percutz/index? Can i redirect http://localhost/percutz/index to http://localhost/ with no php redirect? Btw, thanks again! I'm learning PHP. I program Oracle and ASP.Net. How to start a project with CodeIgniter? - El Forum - 02-01-2012 [eluser]quasiperfect[/eluser] hi Mauricio de Abreu Antunes try this for a good htaccess http://www.farinspace.com/codeigniter-htaccess-file/ be sure index.php is defined as controller is not only about the filename example name.php Code: class Name extends CI_Controller in config/routes.php you can define default_controller so when you visit http://localhost/percutz the default controller/index function is run read the user_guide http://ellislab.com/codeigniter/user-guide/general/controllers.html |