Welcome Guest, Not a member yet? Register   Sign In
About removing the index.php in URL
#1

[eluser]Unknown[/eluser]
Hi Guys,

I am using the CI 2.02, and I not so clearly how to remove the index.php in URL.
I create a file:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

and name it as .htaccess.
Where I should put it?
#2

[eluser]btray77[/eluser]
You should put it in the root directory of your codeIgniter install. (where the index.php file is) and remember to edit the config file to remove index.php from the url.

-Brad
#3

[eluser]RHS[/eluser]
Make a new file named ".htaccess" and save it at the root of your project in html_public directory

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1

On config/config.php file from CI make shure around line 29 looks like this:

Code:
$config['index_page'] = '';

Then try it, should work fine if rewrite_module is active on your server
#4

[eluser]Unknown[/eluser]
[quote author="RHS" date="1308820357"]Make a new file named ".htaccess" and save it at the root of your project in html_public directory

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1

On config/config.php file from CI make shure around line 29 looks like this:

Code:
$config['index_page'] = '';

Then try it, should work fine if rewrite_module is active on your server[/quote]

Thanks Sooooo much!




Theme © iAndrew 2016 - Forum software by © MyBB