I need your help with Laravel 5. I use xampp if this matters. I have removed a public folder from URL by copying .htaccess file to the main directory of the site. Than i renamed a "server.php" file to "index.php". That FINALLY helps me to kick that annoying folder from URL. BUT, now I haven't any styles on the pages of that project.When I open them in browser I see pages of HTML without CSS. Can somebody help me in this? I wanted to post pictures to help u guys understand what I see, but i haven't enough reputation do that. Thanks.
No styles in Laravel 5 after "removing" public folder from URL
6k Views Asked by BrainOverflow At
3
Don't rename your
server.phptoindex.php. There is already anindex.phpinside yourpublicdirectory. Rename it back toserver.php, create a.htaccessfile inside your root web directory, and paste this inside the.htaccessfile:I've used this
.htaccessfor a while during local development, and it works just fine. Keep in mind for production you wouldn't want to do this.You shouldn't need to change anything else. Let me know if it works!
Here's the
web.configversion as well for IIS development: