.htaccess - Codeigniter htaccess for multiple applications -


hello guys can me how set proper url in codeigniter using multiple applications , proper .htaccess

folder structure

-application  -api  -cms -system -api.php -cms.php 

its works when use this

http://localhost/kitkat_funs/cms.php/ http://localhost/kitkat_funs/api.php/ 

but want this

http://localhost/kitkat_funs/cms/ http://localhost/kitkat_funs/api/ 

my htaccess

rewriteengine on rewritecond %{request_filename} -s [or] rewritecond %{request_filename} -l [or] rewritecond %{request_filename} -d rewriterule ^.*$ - [nc,l] rewriterule ^.*$ index.php [nc,l] 

please try following steps:
in config=>config.php, replace following.

$config['index_page'] = 'index.php'; 

to

$config['index_page'] = ''; 

please put following code .htaccess file, might achieve result.

write project folder name rewritebase

rewritebase /yourprojname/      rewriteengine on     rewritecond %{request_uri} ^/system.*     rewriterule ^(.*) index.php?/$1 [l]     rewritecond %{request_filename} !-f     rewritecond %{request_filename} !-d     rewriterule ^(.+) index.php?/$1 [l]     

*take backup of .htaccess file.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -