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

#1
[eluser]Unknown[/eluser]
ex:
localhost/CI/index.php/welcome/hello

to

localhost/CI/welcome/hello
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 ?

#2
[eluser]StevenSokulski[/eluser]
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.

Code:
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!

#3
[eluser]Unknown[/eluser]
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
wamp/www/CI/
CI contains
application/
system/
index.php
.htaccess

.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

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

#5
[eluser]CroNiX[/eluser]
Also, try this htaccess
Code:
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.