Laravel网站在另一个Laravel网站.htaccess的文件夹中?

时间:2019-05-27 06:23:47

标签: php laravel .htaccess

我正在尝试找到解决此问题的最佳方法,因此,我们将不胜感激。我的/var/www/html文件夹中有一个Laravel主站点。这几乎可以处理所有事情,但我需要为特定任务添加另一个项目,并希望将其添加到/var/www/html/wrettin下。目前,基本文件夹的.htaccess中没有任何内容,因为它们几乎都是通过Apache2服务器的default.conf文件处理的。

这是conf文件:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@me
        DocumentRoot /var/www/html/public

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
<Directory /var/www/html/public/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
</VirtualHost>

什么是合适的配置,以使所有路径都转到主应用程序,同时迫使转到wrettin路径的路径重定向到新应用程序?

我将不胜感激!谢谢!

0 个答案:

没有答案