Home Laravel How to enable rewrite mode for apache in ubuntu?

How to enable rewrite mode for apache in ubuntu?

by Shahriar Sagor

Today now in this post i would like to share with you how to enable rewrite mode for apache in ubuntu .Whenever we have need to rewrite index.php file from the url we can find this solution here. we can do this easily enable and rewrite mode by using the bellow terminal command. when we are create one virtual host for our laravel application and then need to open in browser and open our created virtual url. but when i was click on login then i was found following error :

URL not found....

But when i was try to add index.php like this way then it was working good:


So we can remove our index.php from the url. so need to run following command:

sudo a2enmod rewrite
sudo service apache2 restart

Now we can open this way:


Read Also : How to convert Object into Array in PHP?

Thanks for read. I hope it help you. For more you can follow us on facebook.


You may also like