.htaccess - Removing public form laravel url? -
i removing public laravel url using .htaccess writing code on htaceess file
<ifmodule mod_rewrite.c> rewriteengine on rewriterule ^(.*)$ public/$1 [l] </ifmodule>
htacces file in root of laravel , mode_rewrite enable after getting error sorry, page looking not found.
can still welcome page http://localhost/laravel/public/
please solve issue
your web server configuration wrong. should point web server public
directory.
for example, if you're using apache, should set this:
<virtualhost *:80> servername myapp.localhost.com documentroot "/home/vagrant/projects/myapp/public" <directory "/home/vagrant/projects/myapp/public"> allowoverride </directory> </virtualhost>
in xammp, mamp, openserver etc. need change root directory laravel's public directory.
also, don't forget restart web server make work.
Comments
Post a Comment