【发布时间】:2018-03-22 07:55:06
【问题描述】:
我有一个用 angularJS-php 创建的网站。我有两个不同的索引页。其中一个是“index.php”,另一个是“index.html”。
我在 login.tpm.html 中有一个 href
<a href="/member/somePage">
在 index.php 中寻找动作。在 index.php 中,对于给定的 URL/请求,我正在导航到 angular 的 index.html 。在 angular index.html 中,我使用的是呈现角度状态的 ui-view。 index.php:
$app->get('/member/somePage', function () use ($app) {
$app->response()->redirect('folder1/sub-folder2/index.html?v=0301b');
});
这里的问题是,创建的 URL 是
http://localhost:443/folder1/sub-folder2/index.html?v=0131b#!/PageName
而我希望 url 是
http://localhost:443/PageName
谁能告诉我如何做到这一点。如何从 URL 中删除文件夹结构
【问题讨论】:
标签: php angularjs .htaccess url-rewriting angular-ui-router