Multiple Choices error page in 1and1

2019-04-16 17:46发布

I have done my project using laravel. I want to upload my project on 1and1. I set my directory structure on 1and1 is as '/directory' which contains index.html file which links to the other page in /directory/EngageV1/public/auth/login. but when I visits this page I am getting the error page as,

Multiple Choices The document name you requested (/index.php) could not be found on this server. However, we found documents with names similar to the one you requested. Available documents: /index.html (common basename) Please consider informing the owner of the referring page about the broken link.

My .htaccess file looks like,

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /index.php [L]

</IfModule>

If enter url as /directory/EngageV1/public/ then it shows me the welcome page which I have set in routes.php file for route as '/'. Only this page works fine,I don't know what to do, Please give any suggestion.

标签: php laravel-5
1条回答
我只想做你的唯一
2楼-- · 2019-04-16 18:41

Replace default contents in your .htaccess file under your the public folder with the following.

RewriteBase /

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

If you still have problems look at this tutorial about how to deploy a Laravel webapp to 1and1

查看更多
登录 后发表回答