CodeIgniter Forums
Removing the index.php file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Removing the index.php file (/showthread.php?tid=7106)



Removing the index.php file - El Forum - 03-25-2008

[eluser]Unknown[/eluser]
Hi all,
i am want to ramove index.php file from my URI
my site URI is
Code:
http://www.mysite.com/index.php/folder/food/apple

and want to show my URI like this
Code:
http://www.mysite.com/folder/food/apple

and also i want to protect my url by password

plz help me i m in very trouble .


Removing the index.php file - El Forum - 03-25-2008

[eluser]GSV Sleeper Service[/eluser]
the answer is in the user guide - http://ellislab.com/codeigniter/user-guide/general/urls.html

you can set a password using the .htaccess file too (this is a Code Igniter support forum, not an apache forum!)


Removing the index.php file - El Forum - 03-26-2008

[eluser]trice22[/eluser]
Have a look here: http://www.freewebmasterhelp.com/tutorials/htaccess/3
Always helpful: http://www.google.com/search?client=safari&rls=en-us&q=protect+directory+htaccess&ie=UTF-8&oe=UTF-8


Removing the index.php file - El Forum - 03-26-2008

[eluser]Unknown[/eluser]
I have used this code provided by user guide but it is not working .

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


it is show my url like this and blank page
Code:
http://www.mysite.com/folder/food/apple

i am redirecting page by this code
Code:
redirect("index.php/folder/food/apple")


and routes code is

Code:
$route['folder/foode/(:any)'] = "foodstock"

i can't see anything on my page