【发布时间】: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