CodeIgniter Forums

Full Version: How i can remove the index.php from the url
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum



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 ?

El Forum

If you've followed the instructions here ( 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!

El Forum

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

El Forum

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

El Forum

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