htaccess的域和子域与laravel

问题描述:

我试图弄清楚如何设置域和子域以在共享主机帐户上工作。这是一个Laravel 5.1应用程序。

I'm trying to figure out how to set up a domain and subdomain to work on a shared hosting account. It is a Laravel 5.1 application.

我的访问文件是

Options +SymLinksIfOwnerMatch

RewriteEngine On

RewriteRule ^ index.php [L]

我刚购买了另一个域并添加了它,但出现500错误。我重命名了访问文件,然后它起作用了。因此,它与访问文件有关。本质上,我想要两个单独的域,并且想要两个单独的laravel应用程序,每个应用程序一个。

I just purchased another domain and added it on, but I get a 500 error. I renamed the access file and then it worked. So it has something to do with the access file. Essentially I want two separate domains with and I'm wanting two separate laravel applications, one for each.

我不熟悉atacceess。

I'm not familiar with atacceess.

也许您会得到一个重定向循环,因为该规则不受条件保护。虽然Laravel的默认htaccess应该已经包含它们。

Maybe, you get a redirect loop, because the rule isn't protected by a condition. Although the default htaccess of Laravel should already contain them.

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