【问题标题】:Serving laravel over HTTPs using Angular-UI使用 Angular-UI 通过 HTTPs 服务 laravel
【发布时间】:2015-12-01 09:16:56
【问题描述】:

我正在尝试通过 HTTPS 使用 Angular-UI 提供 Laravel 4 路由。如果没有 HTTPs 它可以工作,但同样会带来 404 错误。

感谢您的帮助。

htaccess 文件:

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

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

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

路线:

Route::get('index', array('as'=>'index','uses'=>'PagesController@getIndex'));

Angular-UI

state('home', {
            url: '/home',
            templateUrl: 'index'
        })

【问题讨论】:

    标签: php angularjs .htaccess mod-rewrite laravel-4


    【解决方案1】:

    我已经找到了解决方案,我希望这对某人有所帮助。在 linux 上执行以下操作:

    sudo leafpad etc/apache2/sites-available/default-ssl

    然后在该文件上编辑以下行 AllowOverride None

    <Directory />
            Options FollowSymLinks
            AllowOverride None
        </Directory>
        <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
        </Directory>
    

    收件人:

    AllowOverride all
    

    谢谢大家。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-11-05
      • 2017-01-11
      • 2011-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-12
      • 2020-10-22
      相关资源
      最近更新 更多