0

I know this is a issue alot of people have but even after fixing everything I still don't get any result.

At this moment when I go to

shorty.../public/users

I get the following

shorty../public/index.php/users was not found on this server.

But when I add index.php in the url bar then it works. ( the not clean version )

this is my htaccess file

<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*) index.php/$1 [L]
</IfModule>

And this is my httpd.conf file

<Directory "/Library/WebServer/Documents">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

2 Answers 2

2

Try changing your RewriteRule to ^ index.php. Also, and if that fails, please share your entire virtual host config for the domain you're working with so that I can see your document root.

If your Laravel installation is not at the root of your domain, then you will need to add a RewriteBase. For example, if you installed it in a folder inside a public document root, like //localhost/myfolder/, then your RewriteBase must be set to /myfolder/public/.

Also, if you installed Laravel above your webroot, and not below (which is not recommended), then your RewriteBase should be set to /public/.

But, like I said, I can't tell where everything is, relatively speaking, to your host domain. So if the above doesn't work, then please update your question with the full virtual host config.

Sign up to request clarification or add additional context in comments.

Comments

0

I had the same preoblem, It worked for me by shifting to Xampp server and putting 'index' => '', inside the app/config/app.php. Hopefully it will work for u too. Happy Coding.

Comments

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.