• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help removing index.php from url


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

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

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.



This thread should help you to do that.

[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]

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.



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.