从url中删除index.php文件 - Codeigniter

this is my link :

http://vitrinsaz1.ir/Mobile/Vitrinsaz/Pannel/index.php/welcome

I would like to remove index.php from url.

my .htaccess file :

/Pannel

.htaccess

<IfModule mod_rewrite.c>


RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.vitrinsaz1.ir
RewriteRule ^.*$ http://www.vitrinsaz1.ir%{REQUEST_URI} [R=301,L]

RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L,QSA] 

</IfModule>

$config['index_page'] = '';

$config['base_url'] = 'http://vitrinsaz1.ir/Mobile/Vitrinsaz/Pannel/';

Try this

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

for more read this http://w3code.in/2015/09/how-to-remove-index-php-file-from-codeigniter-url/

Add ? after index.php in last rule so your .htaccess would be like

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.vitrinsaz1.ir
RewriteRule ^.*$ http://www.vitrinsaz1.ir%{REQUEST_URI} [R=301,L]

RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]

You can try this settings ;

$config['uri_protocol'] = 'REQUEST_URI';
$config['index_page'] = '';
$config['base_url'] = '';

And .htaccess ;

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/system/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

https://ellislab.com/expressionengine/user-guide/urls/remove_index.php.html

if it does not work try this link ;

http://www.formget.com/codeigniter-htaccess-remove-index-php/