I have created an htaacess file as mentioned at below link
After creating htaccess file and writing below code in it I am able to access my public folder without writing public in url but still framework is not working properly like: 1. when I die a text inside index.php it is showing up on webpage but once the line "$response->send();" execute it error blade starts showing and images and other asset's url looks like this :
http://localhost/common/images/404.jpg
http://localhost/common/images/404.jpg
My .htaccess file outside public which I have created myself:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
The solutions I found on SO and other sites are to place index and htaccess file outside public folder on project root. But I don't want to do that I want to change htaccess only so that I don't have to write public in my urls. Creating virtual host was also the solution but I also don't want to do that.
Please suggest If anyone know solutions other than creating virtual host or moving files outside public folder.
Already referred below solutions:
Thanks!
Update After installing a fresh project when I followed same step that is creating htaccess file on project root and writing below code in it I got below error:
htaccess file code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
error
Sorry, the page you are looking for could not be found.
1/1 NotFoundHttpException in RouteCollection.php line 161: