EllisLab text mark
Advanced Search
     
CI & XAMPP… does not works without “index.php”
Posted: 11 October 2012 08:07 AM   [ Ignore ]
Joined: 2012-10-11
3 posts

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:

$config['base_url''http://localhost/emigall/CI';
$config['index_page'''

In the CI dir the .htaccess contents:

RewriteEngine on
RewriteCond 
$!^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L] 

Modrewrite is loaded in the httpd.conf (decommentated string)

LoadModule rewrite_module modules/mod_rewrite.so 

dir’s allow override set on “All”

<Directory />
    
Options FollowSymLinks
    AllowOverride All
    
#XAMPP
    #Order deny,allow
    #Deny from all
</Directory

Where’s the error???

 
Posted: 11 October 2012 10:01 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2011-10-12
103 posts

First, try this .htacces:

<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:

$config['index_page'''

This should work i guess.

 Signature 

SMC - full CRUD Model for CodeIgniter:
forum: http://codeigniter.com/forums/viewthread/223845/

 
Posted: 11 October 2012 11:49 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-10-11
3 posts
alexwenzel - 11 October 2012 10:01 AM

This should work i guess.

You’re right! smile

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

 
Posted: 11 October 2012 12:01 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2011-10-12
103 posts

Thanks for feedback. You’re welcome.

 Signature 

SMC - full CRUD Model for CodeIgniter:
forum: http://codeigniter.com/forums/viewthread/223845/