.htaccess - mod_rewrite CodeIgniter -


now url website example: http://localhost/xxx/index.php/welcome/

i want change to: http://localhost/xxx/welcome/

my .htaccess file:

<ifmodule authz_core_module>     require denied </ifmodule> <ifmodule !authz_core_module>     deny </ifmodule> rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1 [l] 

my config.php file:

$config['base_url'] = 'http://localhost/xxx/'; $config['index_page'] = ''; 

but new url still doesn't work. should add there?

you can try following mod_rewrite. works , saw on 1 of tutorials watched here , here .htaccess.

<ifmodule mod_rewrite.c> rewriteengine on rewritebase /foldername/foldernameifapplicable/foldernameifapplicable  #removes access system folder users. #additionally allow create system.php controller, #previously not have been possible. #'system' can replaced if have renamed system folder. rewritecond %{request_uri} ^system.* rewriterule ^(.*)$ /index.php?/$1 [l]  #when application folder isn't in system folder #this snippet prevents user access application folder #submitted by: fabdrol #rename 'application' applications folder name. rewritecond %{request_uri} ^application.* rewriterule ^(.*)$ /index.php?/$1 [l]  </ifmodule>  <ifmodule !mod_rewrite.c>     # if don't have mod_rewrite installed, 404's     # can sent index.php, , works normal.     # submitted by: elliothaughin  errordocument 404 /index.php </ifmodule>      

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -