• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How i can remove the index.php from the url



I tried to update .htaccess file but it give me when i want to access the page using this url:localhost/CI/welcome/hello
that the page not found
and if the problem is in the .htaccess file tell me where to put this file in which root ?

If you've followed the instructions here (http://ellislab.com/codeigniter/user-gui.../urls.html) it may be that your server does not have a compatible rewrite engine.

To check if Mod Rewrite is enabled, try the following in a PHP file on your localhost.

echo in_array('mod_rewrite', apache_get_modules());

Provided that returns true, then you might be using the wrong .htaccess file. The .htaccess file should be at the same level as your index.php file.

Good luck!

I have appache 2.2 and wamp 2.0 and mod_rewrite is enabled on my server but i still facing this problem
the roots is
CI contains

.htaccess contains the following
RewriteEngine on
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /index.php/$1 [L]

and i try to put $config['index_page'] = '';
and iam still facing a problem

Is your apache config similar to this except with the correct path to your htdocs?
<Directory "D:/public_html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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