Problem with URI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with URI (/showthread.php?tid=16963) |
Problem with URI - El Forum - 03-21-2009 [eluser]MicroBoy[/eluser] I changed this to blank like you can see: Code: $config['index_page'] = ""; When I want to open: Code: http://localhost/ele/home Code: Object not found! When I write: Code: http://localhost/ele/index.php/home p.s. Any one can help me? Meaby I didn't post in the right place cause I'm new here sorry. Problem with URI - El Forum - 03-21-2009 [eluser]cmark[/eluser] simple: if you uses $config['index_page'] = ""; you need the .htacces http://ellislab.com/codeigniter/user-guide/general/urls.html Problem with URI - El Forum - 03-22-2009 [eluser]MicroBoy[/eluser] It's To easy when you know the answer, THNX a lot. But now: I have this link Code: <a href="shto">Kthehu</a> And in webpage it shows http://localhost/ele/index.php/shto , is any way to remove this index.php Problem with URI - El Forum - 03-22-2009 [eluser]Nevio[/eluser] Few things.... 1.) Code: $config['base_url'] = "http://localhost/ele"; 2.) Code: $config['index_page'] = ""; 3.) Code: $config['uri_protocol'] = "REQUEST_URI"; 4.) .htaccess file Code: # Set directory index to index.php 5.) Go load http://localhost/ele/home . Btw home controller must exists as index method. You must have mod rewrite ( Apache ) enabled. 6.) If this don't help well.. Than I dun know what's your problem about. Problem with URI - El Forum - 03-22-2009 [eluser]MicroBoy[/eluser] ------------------------------------------------------------------- 3) Code: $config['uri_protocol'] = "REQUEST_URI"; 4)------------------------------------------------------ Code: # Set directory index to index.php Code: RewriteEngine on Problem with URI - El Forum - 03-22-2009 [eluser]Nevio[/eluser] When I do this, for every page it says “The page you requested was not found.” Check if your controller exist. I'm seeing "The page you requested was not found" error only if my method doesn't exist or controller. set this one than Code: # Set directory index to index.php This above MUST WORK. I spend hours and hours and this works for me on linux, windows and mac systems. If you still cannot find solution, hmm... than I must say I dun know the answer. ( need to see code to be able fix it. ) Problem with URI - El Forum - 03-22-2009 [eluser]MicroBoy[/eluser] Meaby I made a mistake while I was coding and I don't know what I did wrong, anyway thnx for try. Problem with URI - El Forum - 03-23-2009 [eluser]menslow[/eluser] I think I'm having the same problem as MicroBoy... I'm getting a "404 not found" on my local workstation for the following URL: http://localhost/michaelenslow2/services The page loads fine when I go to: http://localhost/michaelenslow2/index.php/services I've done the following: 1. Set: Code: $config['base_url'] = "http://localhost/michaelenslow2"; 2. Set: Code: $config['index_page'] = ""; 3. Set: Code: $config['uri_protocol'] = "REQUEST_URI"; 4. .htaccess file: Code: # Set directory index to index.php 5. And here's my services controller: Code: <?php 6. Here's my OS setup: OS: mac 10.5 Web Server: Apache 2.0 PHP version: 5.2.6 Any ideas? Probably something silly. Problem with URI - El Forum - 03-23-2009 [eluser]TheFuzzy0ne[/eluser] What's your file name? You need to ensure it's all lowercase. Problem with URI - El Forum - 03-23-2009 [eluser]menslow[/eluser] Thanks for the reply TheFuzzyOne... My controller file name is: services.php (all lowercase) |