htaccess的域和子域与laravel [英] htaccess for domain and subdomain with laravel

查看:78
本文介绍了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]

这篇关于htaccess的域和子域与laravel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆