CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - 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: CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems (/showthread.php?tid=28975) |
CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]InsiteFX[/eluser] You can try this one, pay attention to the comments... I am running XAMPP 1.7.3 with PHP 5.3.1 Also make sure that LoadModule rewrite_module modules/mod_rewrite.so is turned on in your apache http.conf file... Also the path is http://localhost/ because your running on a local machine. The .htaccess file should be placed in the root directory were CodeIgniter's index.php file is. Code: # A lot of people make this mistake! on Windows the extension is .so not .c Enjoy InsiteFX CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]nickstaroba[/eluser] Yes, I noticed the extension difference and tried that in both your file and the original that I posted. No luck. I'm reading up on the rewrite module now in hopes I can figure this out...it's something I should know anyway. I thought this was going to be simple but it's taking longer than I expected so I have another question. I'm relatively new to web development so please forgive my ignorance of these things. Here is my think on this (please correct me if I'm wrong in this somewhere): I want index.php gone on the production version of this app. I want my URLs to be accurate in my development version locally for smooth implementation to production. So, in order for my local version to be accurate (in terms of URLs) I need to mirror the the production version locally, i.e. no index.php. Correct? Also, while I need to know the way to do this using Apache (for many reasons), the production environment is using IIS so I'm also going to have to figure out how to manipulate the URL there as well. So, am I just wasting my time or what? Do I really need to have the index.php removed locally if I'm implementing on IIS anyway? I'm assuming I do, but I'm still new so in case I'm missing something, I have to ask. CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]InsiteFX[/eluser] Sometimes it will not work on windows. Have sites live that it works on fine. Enjoy InsiteFX CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]InsiteFX[/eluser] You do not need to have it removed locally, just make sure that when you go live that you upload the .htaccess file were index.php is. Also in your config.php file $config['index_page'] = ""; You will also need to change your $config['base_url'] = live site"; And edit your index.php so that it points to the system and application folders. Enjoy InsiteFX CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]InsiteFX[/eluser] Here is a very good site for some of the things you are looking for. Addedbytes Enjoy InsiteFX CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]nickstaroba[/eluser] Addedbytes looks like a good site. I'm going to start reading through their tutorials. In the meantime though I tried the very first example found on this site: http://www.workingwith.me.uk/articles/scripting/mod_rewrite And it's not working at all... I'm totally perplexed by this. I know it's reading the file because when I type random characters I get a 500 error. But when I use the example .htaccess: Code: RewriteEngine on nothing happens... This is very confusing. CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]nickstaroba[/eluser] Could this have something to do with read/write permissions?? CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 03-31-2010 [eluser]InsiteFX[/eluser] It could depending on what version of windows your running I have a user account on Windows Vista with Administrator rights. Enjoy InsiteFX CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 04-26-2010 [eluser]nickstaroba[/eluser] Somehow I got this working. I really don't know what I was doing wrong because I thought I had tried this scenario before. I'll have to review it later today, as I don't have time but I do want to post how this is working now. Using xampp, I placed the Codeigniter directly into htdocs so that http://localhost/ would take me to the welcome page. I then placed the .htaccess file exactly as described in the documentation into the htdocs folder. So, it is in the same folder as the main index.php for CI. I also got this working for vhosts in the same manner. Index.php in the root folder with the .htaccess and it works. Hope this helps. I can give more details later on. CodeIgniter 1.7.2 + XAMPP 1.7.3 + .htacess problems - El Forum - 06-07-2010 [eluser]Mini0n[/eluser] Can anyone help me on this? I've done everything stated on this thread, and got no success... CodeIgniter 1.7.2 @ Windows 7 with XAMPP 1.7.3. http://localhost/ci/ - Works http://localhost/ci/index.php - Works http://localhost/ci/index.php/demo - Works http://localhost/ci/demo - The page redirects to http://localhost/xampp The .htaccess file is located at htdocs/ci/.htaccess and contains: Code: <IfModule mod_rewrite.so> And on the CI's config.php: Code: $config['index_page'] = ""; Code: $config['uri_protocol'] = "AUTO"; What am I missing? Thanks. |