apache - How to redirect index.php to root using .htaccess -



apache - How to redirect index.php to root using .htaccess -

i have xampp installed on windows8.1. i’ve enabled mod_rewrite in apache conf file, , i’m using .htaccess file .i have restarted webserver , followed step step instructions enable .htaccess files , mod rewrite.

with in place application resides @ http://example.com/ci/

now problem when go http://example.com/ci/index redirected xampp splash screen. when go http://example.com/ci/ i’m fine. have config variable set $config[‘index_page’] = “”; , have htaccess file inplace.

i may have been staring @ long have no thought what’s happening. know not ci problem , somewhere issue has lie mod_rewrite i’m fresh out of ideas. help appreciated.

below .htaccess

<ifmodule mod_rewrite.c> rewriteengine on rewritebase / # removes index.php expressionengine urls rewritecond %{the_request} ^get.*index\.php [nc] rewritecond %{request_uri} !/system/.* [nc] rewriterule (.*?)index\.php/*(.*) /$1$2 [r=301,ne,l] # directs ee web requests through site index file rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ ci/index.php/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> errordocument 404 /index.php </ifmodule>

make htaccess file simple below hope work

rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule .* /ci/index.php/$0 [pt,l] rewritebase /clientname/

and define default controller in config

php apache .htaccess codeigniter mod-rewrite

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -