php - Codeiginter : Error in URL -


my front url is-

http://localhost/myproject/

admin url -

http://localhost/myproject/admin

it works in windows not works on ubuntu.

it gives error "not found".

what works in ubuntu -

the front page working - http://localhost/myproject/

the admin login page working if add index.php in url - http://localhost/myproject/index.php/admin

not other pages working

my .htaccess file contents-

rewriteengine on rewritecond $1 !^(index\.php|assets|themes) rewriterule ^(.*)$ /myproject/index.php/$1 [l]  

my apache's mod-rewrite module on.

i following similar issue in centos, , followed below tutorial :

how permit changes in .htaccess file:

open httpd using ------------------> vi /etc/httpd/conf/httpd.conf

once inside file, find following section, , change line says allowoverride none all. section should this:

options indexes followsymlinks multiviews allowoverride order allow,deny allow

after save , exit file, restart apache. .htacess files available of sites.

service httpd restart

content of .htaccess file:

options +followsymlinks -indexes rewriteengine on  # notice: if 404 play combinations of following commented out lines #allowoverride #rewritebase /  # restrict site 1 domain #rewritecond %{http_host} !^www\. #rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d  rewritecond $1 !^(index\.php|images|fonts|js|images|robots\.txt|css) <ifmodule mod_php5.c>     rewriterule ^(.*)$ index.php/$1 [l] </ifmodule>  <ifmodule !mod_php5.c>     rewriterule ^(.*)$ index.php?/$1 [l] </ifmodule> 

prevent access htaccess file

order allow,deny deny

disable directory browsing

options -indexes indexignore *


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -