codeigniter - Why is my http authentication not working? -



codeigniter - Why is my http authentication not working? -

i set http authentication 1 of sites. web app built using code igniter , custom uri routing. after changing .conf file site, got 404 not found errors when trying access of pages besides homepage. example, navigating /about, worked before http authentication, not gives 404 message:

the requested url /about not found on server. apache/2.4.7 (ubuntu) server @ example.com port 80

why apache sending request '/` directory? .conf file(slightly adapted security) under sites-enabled following:

<virtualhost *:80> # servername directive sets request scheme, hostname , port # server uses identify itself. used when creating # redirection urls. in context of virtual hosts, servername # specifies hostname must appear in request's host: header # match virtual host. default virtual host (this file) # value not decisive used lastly resort host regardless. # however, must set farther virtual host explicitly. servername example.com directoryindex index.php serveradmin webmaster@localhost documentroot /home/user/codeigniter # available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # possible configure loglevel particular # modules, e.g. #loglevel info ssl:warn errorlog /home/user/logs/codeigniter/error.log customlog /home/user/logs/codeigniter/access.log combined # configuration files conf-available/, # enabled or disabled @ global level, possible # include line 1 particular virtual host. illustration # next line enables cgi configuration host # after has been globally disabled "a2disconf". #include conf-available/serve-cgi-bin.conf <directory /home/user/codeigniter/> # options indexes followsymlinks includes execcgi # allowoverride # require granted authtype basic authname "beta site" # (following line optional) authbasicprovider file authuserfile /var/www/passwd/passwords require user user </directory>

in directory definition <directory /home/user/codeigniter>, need change:

# allowoverride

to

allowoverride

and restart apache.

without that, .htaccess file in document root won't work , able access /about through uri /index.php/about.

codeigniter http http-authentication

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -