php - htaccess is not working after moving from XAMPP to LAMP on ubuntu 13.10 (Enable htaccess in apache linux server) -
my codeigniter project running on xampp system url,
http://localhost/newsfeeds/users/allcategories/
when move project system has lamp server on ubuntu 13.10. run same page need url,
http://localhost/newsfeeds/index.php/users/allcategories/
i need index.php file otherwise shows page not fount error.
my htaccess file is,
rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1 [l]
how can run same project without index.php on both wampp , xamp server ?
i found solution issue.
in server mode rewrite on. default values need change on /etc/apache2/apache2.conf
file. following changes,
first, find
<directory /var/www/> options indexes followsymlinks allowoverride none require granted </directory>
and change allowoverride none all , save.
then enable mode rewrite using command(in case enabeled),
$ sudo a2enmod rewrite
then restart server,
$ sudo /etc/init.d/apache2 restart
run project. works fine.
Comments
Post a Comment