CodeIgniter Forums
Need help removing index.php from url - 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: Need help removing index.php from url (/showthread.php?tid=40979)



Need help removing index.php from url - El Forum - 04-25-2011

[eluser]alucard[/eluser]
Hi,

I'm trying to remove index.php from url. I am following the steps outlined in the codeigniter wiki:
http://codeigniter.com/wiki/mod_rewrite/

I am stuck on step 4 though.

Step 4 says that:
It seems to be sufficient if you add these two lines to your <Directory> section where you configure the document root for your CI application:

<Directory "/some/absolute/path/htdocs">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>

I can't find <Directory> section. If someone can tell me where I can find it, or point me in the right direction, I'd appreciate it.

Thanks.

Alucard


Need help removing index.php from url - El Forum - 04-25-2011

[eluser]toopay[/eluser]
This thread should help you to do that.


Need help removing index.php from url - El Forum - 04-26-2011

[eluser]Prensil Technologies Pvt Ltd.[/eluser]
Just add .htaccess file besides system module.

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


Need help removing index.php from url - El Forum - 05-12-2011

[eluser]alucard[/eluser]
Thanks for helping me out guys.

I needed to add # before the RewriteBase / in the ht.access file because my project is in another folder.


Before it was

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /


now its

<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteBase /

Thanks to all who tried to help me out.

Bye

Alucard