![]() |
CI, Xampp, and mod_rewrite - 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: CI, Xampp, and mod_rewrite (/showthread.php?tid=16654) Pages:
1
2
|
CI, Xampp, and mod_rewrite - El Forum - 03-12-2009 [eluser]stretchnate[/eluser] Ok first I know there have been a few posts on this topic and I have tried the advice in them to no avail. I'm running Xampp on windows xp pro and using code igniter. One thing to note is my CI application is in a subdirectory. below are my config details. config.php $config['base_url'] = "http://localhost/n8/"; $config['index_page'] = ""; .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /n8/ #Removes access to the system folder by users. #Additionally this will allow you to create a System.php controller, #previously this would not have been possible. #'system' can be replaced if you have renamed your system folder. # all these paths will be ignored RewriteCond %{REQUEST_URI} !^/index\.php.* RewriteCond %{REQUEST_URI} !^/pma.* RewriteCond %{REQUEST_URI} !^/manager.* RewriteCond %{REQUEST_URI} !^/images.* RewriteCond %{REQUEST_URI} !^/css.* RewriteCond %{REQUEST_URI} !^/javascript.* # rewrite url (if it doesn't match the paths listed above) RewriteRule ^(.*)$ /n8/index.php/$1 [L] </IfModule> httpd.conf LoadModule rewrite_module modules/mod_rewrite.so <Directory "C:/xampp/htdocs"> Options Indexes Includes FollowSymLinks MultiViews AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> the following three things have been modified in every order to either have or not have the "n8" in them but no combination works... I keep getting a 500 internal server error. $config['base_url'] = "http://localhost/n8/"; RewriteBase /n8/ RewriteRule ^(.*)$ /n8/index.php/$1 [L] I've also tried combinations with the RewriteRule having no leading / before the n8. I've followed the instructions in the wiki (http://codeigniter.com/wiki/mod_rewrite/) and even used the .htaccess that is available there. I've also tried the suggestions in each of the following posts. http://ellislab.com/forums/viewthread/46715/ http://ellislab.com/forums/viewthread/100487/#507300 does anyone have any other suggestions? CI, Xampp, and mod_rewrite - El Forum - 03-12-2009 [eluser]Sarfaraz Momin[/eluser] This works for me on XAMPP with CI installation. I have vhost configured for XAMPP and its works great. Code: Options +FollowSymLinks CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]stretchnate[/eluser] thanks for the response, I tried your code and it didn't seem to make a difference. and by that I mean I still get the index.php in my url, on the plus side my page still loads ![]() CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]Sarfaraz Momin[/eluser] Ok. Just remove the index.php from the config file Code: $config['index_page'] = ""; CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]stretchnate[/eluser] already did. CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]TheFuzzy0ne[/eluser] Try removing the ReWriteBase. It's not necessary unless you have an alias set up in your vhosts file. CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]stretchnate[/eluser] still no joy CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]TheFuzzy0ne[/eluser] Uhm... Am I hallucinating, or do you have: Code: $config[‘base_url’] = “http://localhost/n8/”; written in your htaccess file? EDIT: I'm hallucinating. I saw: $config[‘base_url’] = “http://localhost/n8/”; RewriteBase /n8/ RewriteRule ^(.*)$ /n8/index.php/$1 [L] and thought, Huh?? CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]Georgi Veznev[/eluser] Have you tried to restart the Apache service? Sometimes the changes do not take effect after the first restart? (Do not use the XAMPP control panel) Also double check: Code: $config['base_url'] = "http://localhost/n8/"; CI, Xampp, and mod_rewrite - El Forum - 03-13-2009 [eluser]TheFuzzy0ne[/eluser] Have you commented out the last line to be sure it's none of the rewrite conditions that is causing the error? |