0

我正在 Ubuntu 系统上使用 PHP、MySQL、apache2 构建 angularjs 项目

项目结构 var/www/html/demo/

Demo文件夹是我的项目文件夹, demo=>js(All js file), index.php, addstudent.php file etc

我在刷新整个页面并在 AngularJS 中使用带有 html5Mode(true) 的路由概念时遇到问题,但它不能与 .htaccess 文件一起正常工作。

在此服务器上找不到请求的 URL /demo/addstudent。

htacces 代码在这里

DirectoryIndex 演示/index.php

RewriteEngine On
RewriteBase /demo/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.php [L]

在 index.php 中添加的基本参考是

4

0 回答 0