.htaccess - Removing index.php in codeigniter xampp for windows -


i tried methods found including on site. did not work redirect.

my config.php      $config['base_url'] = 'http://'.$_server['http_host'];  /* |-------------------------------------------------------------------------- | index file |-------------------------------------------------------------------------- | | typically index.php file, unless you've renamed | else. if using mod_rewrite remove page set | variable blank. | */ $config['index_page'] = ''; 

rewriteengine on

rewritecond %{request_filename} !-d rewritecond %{request_uri} ^(.+)/$ rewriterule ^(.+)/$  /$1 [r=301,l]      rewritecond %{http_host} ^www.**.ru$ [nc] rewriterule ^(.*)$ http://**.ru/$1 [r=301,l]   rewritecond $1 !^(robots\.txt|index\.php|image\.php|favicon\.ico|upload|sotrudnik|generator|links|assets|agents|old|sitemap\.xml|4cc707e99fb15630dc\.html|sitemap_mobile\.xml|yandex_6bfb7e8daf6b3458\.html|holder\.js) rewriterule ^(.*)$ /index.php/$1 [l] 

this .htaccess

you can try following .htaccess:

rewriteengine on rewritecond $1 !^(index\.php|resources|robots\.txt) rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?/$1 [l,qsa] 

and please change config.php bellow:

$config['index_page'] = ''; $config['uri_protocol'] = 'auto'; 

do not forget enable mod_rewrite.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -