I used the code below to remove index.php in codeigniter in my .htaccess file. But the thing that I am confused is where should i use the file. should i use it inside my www folder outside the application or inside the application.

I used it in all places, and it worked but it is messing up with my css or say base folders. How can I overcome the problem. Should i use the html base tag?

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

```

**EDIT**

my folder structure is

```
basefolder
  -application
  -css
  -js
  -images   
  -system
.htaccess
index.php

```