2

I installed laravel+composer in my localhost and then I tried to run basic routes.php with this block of codes:

 Route::get('/x', function()
{
    return 'Hello World';
});

and then I tried to run it by using this http://localhost/laravel/app/x and http://localhost/laravel/x

and I'm gettin this error type:

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
Apache/2.4.4 (Unix) PHP/5.5.3 OpenSSL/1.0.1e mod_perl/2.0.8-dev Perl/v5.16.3

How can I overcome this issue?

1
  • in the routes remove the / before the x. reconfigure your virtualhost settings to point your public folder as the root so you dont have to do what your doing with the url. If you still continue to have problems contact me on gtalk sarmenhb (at) gmail (dot) com Commented Dec 15, 2013 at 19:06

1 Answer 1

1

All of the Laravel routes go through the public folder.

Assuming your project name is Laravel, this should work.

http://localhost/laravel/public/x
Sign up to request clarification or add additional context in comments.

2 Comments

routes.php file -> app/rotues.php so public is not working :(
try chmod -R 777 the laravel folder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.