Why do you need to run http://localhost/my-laravel-app/public/index.php? Why not just http://localhost/my-laravel-app?
with or without index.php
Hi, when i'm running like(http://localhost/my-laravel-app/public), it works good, but when i'm running like (http://localhost/my-laravel-app/public/index.php), my css does not work.
you know why? how can i fix that? regards
i'm not running that :d i'm just assuming maybe users run like that, so it should be fixed right? by the way thanks for replyng
I dont think your average user will try to access routes outside of those presented to them in the ui. If users go off the path you define for them in your app, they shouldn't expect much. Just my opinion I guess.
but this is a bug i guess, thing abut google, google some times show with index.php, and what someone clicks on that link with index.php at the end? i think laravel has something to solve this, normally it should shows the same page with or without index.php
@Old_Pigeon if you have to type http://localhost/my-app/public then your setup is extremely faulty and therefore vulnerable/insecure. Like @zachleigh mentioned, your document root should be set to the public folder.
@Prez, if i set public folder to root, again it gives me the same result. point here is not root. point here is to have 2 different views with index.php and without index.php. if i remove public folder, then when i type localhot/my-app/index.php , again it does not show my css
@Old_Pigeon As you wish, it's your app/headache.
Just change the href to your stylesheet so it looks like /my-laravel-app/public/path/file.css and it should work.
then both does not show css
this is my css code in my master-page < link rel="stylesheet" href="{{ URL::to('src/css/main.css') }}" >
Google probably shows index.php because those sites arent using a modern routing system. I have several sites up and none of them show index.php in google.
@Old_Pigeon did you try change it to what I suggested? Without the {{ URL::to() }}, just plain path
@zachleigh okay, but anyway this should be fixed!
@ Prez, yes, whn i put this code, then both way does no work. < link rel="stylesheet" href="{{ URL::to('public/src/css/main.css') }}" >
hey guys, this is not just my app's problem, this is laravel's problem, you can try with your laravel app and see the same result!
@Old_Pigeon don't use {{ URL::to() }}, just put plain text..
<link rel="stylesheet" href="/public/src/css/main.css">
@Prez, i did now, again both don't show css
@Prez, how did you put code here? and i also cant change my profile pic!
@Old_Pigeon plain text path works for me, but with {{ URL::to() }} it doesn't work.
Look to bottom-right of the reply text box, there is a link to info how to format.
@Prez, i wrongly selected your answer as best answer :D, how can remove that?
@Old_Pigeon I think you can only select another answer as best answer.
@ Prez, :D, but this topic is not solved yet, i think we should report it to laravel
why this forum is like this, i can not reply to each post, and there i no rich-text and so on
This is my CSS in my master layout file
<link href="/inc/css/app.min.css" rel="stylesheet">
And this is the result with index.php/login instead of simply going /login

Bigger image: http://i.imgur.com/2Tg1F8L.jpg
Waiting for the best answer
@Prez, dont go to login page, open app/index.php and see the result
@Old_Pigeon still working..

@ Prez, i dont know, mine doesn work even with plain, but anyway we should find a way work with laraval code too
@Old_Pigeon try php artisan cache:clear and also php artisan view:clear
@Prez, no thats not cash, how did you make your public as root folder? lets make it as root with your way and try again
Please or to participate in this conversation.