CodeIgniter Forums
CI & XAMPP... does not works without "index.php" - 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: CI & XAMPP... does not works without "index.php" (/showthread.php?tid=55124)



CI & XAMPP... does not works without "index.php" - El Forum - 10-11-2012

[eluser]Unknown[/eluser]
Hi guys!

I'm just approaching this fantastic framework. I think it will be perfect for my site (i'm building my own portfolio, i'm a photographer!)

But to test my project i need to have a running versione of CI on my XAMPP!

Now i'm trying to use the fantastic URL Rewriting solution provided by CI, but my xampp has some problems: all the user guide is unviewable (exept the index) because without the "index.php" all the system does not work!

I set up my virtual server as follows:
CI config.php:
Code:
$config['base_url'] = 'http://localhost/emigall/CI';
$config['index_page'] = '';

In the CI dir the .htaccess contents:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Modrewrite is loaded in the httpd.conf (decommentated string)
Code:
LoadModule rewrite_module modules/mod_rewrite.so

dir's allow override set on "All"
Code:
<Directory />
    Options FollowSymLinks
    AllowOverride All
    #XAMPP
    #Order deny,allow
    #Deny from all
</Directory>

Where's the error???


CI & XAMPP... does not works without "index.php" - El Forum - 10-11-2012

[eluser]alexwenzel[/eluser]
First, try this .htacces:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /your-site-whatever/
  
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
  
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

Then goto your config.php and empty the following array:

Code:
$config['index_page'] = '';

This should work i guess.


CI & XAMPP... does not works without "index.php" - El Forum - 10-11-2012

[eluser]Unknown[/eluser]
[quote author="alexwenzel" date="1349964072"]
This should work i guess.[/quote]

You're right! Smile

Now works perfectly! Thanks a lot, now i can start to study & develop my portfolio Smile


CI & XAMPP... does not works without "index.php" - El Forum - 10-11-2012

[eluser]alexwenzel[/eluser]
Thanks for feedback. You're welcome.