htaccess的域和子域与laravel

编程入门 行业动态 更新时间:2024-10-18 22:34:14
本文介绍了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

本文发布于:2023-10-31 16:08:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1546594.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:htaccess   laravel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!