.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
Post a Comment