CodeIgniter Forums
index.php - 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: index.php (/showthread.php?tid=32283)



index.php - El Forum - 07-19-2010

[eluser]sree777[/eluser]
How can i avoid index.php???


index.php - El Forum - 07-19-2010

[eluser]Sean Gates[/eluser]
Can you expound on that?


index.php - El Forum - 07-19-2010

[eluser]sree777[/eluser]
This is the page i got hw to avoid this index.php http://localhost/certificate/administrator/index.php/login
to

http://localhost/certificate/administrator/login.html


index.php - El Forum - 07-19-2010

[eluser]WanWizard[/eluser]
That requires URL rewriting, which is explained in the manual (and numerous posts here).


index.php - El Forum - 07-19-2010

[eluser]sree777[/eluser]
But its not working well.............i had put this code in htacces file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|img|css|js|script|robots\.txt)
RewriteRule ^(.*)$ /certificate/index.php/$1 [L]
</IfModule>


index.php - El Forum - 07-19-2010

[eluser]Zeeshan Rasool[/eluser]
Remove index.php from config.php file and use htaccess as given below.
Code:
Options +FollowSymLinks
Options -Indexes
DirectoryIndex ./index.php
RewriteEngine on

RewriteCond $1 !^(index\.php|images|css|robots|\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

Hope it works !


index.php - El Forum - 07-19-2010

[eluser]WanWizard[/eluser]
If your CI application is installed in the folder 'certificate', add
Code:
RewriteBase /certificate
and change your rule to the one in Zeeshan's example.