Welcome Guest, Not a member yet? Register   Sign In
Removing the index.php file - 11.09.2018
#5

(09-11-2018, 02:47 PM)ecampait Wrote: Create a .htaccess file at the root of the site and copy the code if below :

Code:
# ######################################################################
# # CodeIgniter                                                        #
# ######################################################################

# ----------------------------------------------------------------------
# | Setting up environment                                             |
# ----------------------------------------------------------------------
# development
# testing
# production

SetEnv CI_ENV development

# ######################################################################
# # REWRITES                                                           #
# ######################################################################

# ----------------------------------------------------------------------
# | Rewrite engine                                                     |
# ----------------------------------------------------------------------

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond $1 !^(index\.php|robots\.txt|sitemap\.xml)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

Hello ecampait,

First of all, thank you so much for your answer and i´m sorry for my late answer.

I tried to use before same config that you suggest to use.

I have 2 .htaccess files

One "inside" the application folder

One "outside" the application folder

Both files has the same config that you suggest to use.

What is the the correct one please? "inside" or "outside" the application folder?

And i still don´t get to access the URL without to use the index.php extension

What am i doing wrong please?

Thank you in Advance!

This is the changed Array in the config.php file

Code:
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';
Reply


Messages In This Thread
RE: Removing the index.php file - 11.09.2018 - by Porto - 09-14-2018, 12:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB