相关疑难解决方法(0)

<meta http-equiv ="X-UA-Compatible"content ="IE = edge">是做什么用的?

如果一个网页开头有什么区别

<!DOCTYPE html> 
<html> 
  <head> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
Run Code Online (Sandbox Code Playgroud)

如果页面以.开头

<!DOCTYPE html> 
<html> 
  <head> 
     <!-- without X-UA-Compatible meta -->
Run Code Online (Sandbox Code Playgroud)

如果没有区别,我想我可以忽略X-UA-Compatible元头,因为我只想在所有IE版本中以大多数标准模式呈现它.

html browser internet-explorer x-ua-compatible

1378
推荐指数
10
解决办法
108万
查看次数

用于角度js的apache 2的重写规则

显然,整个网络上都有很多mod重写讨论和答案.但是,我很难抓住它们.所以我想我会问这里.

我要求重写规则来做Andy Joslin在评论中解释的内容:https://stackoverflow.com/a/11100438

这是我在example.com根目录下的当前dir结构

  • 应用程序/
  • app/index.html(角度js应用程序的"根")
  • api(这将是一个用于'api'的symfony 2应用程序.我将从角度向这里发送ajax请求.)

我想将所有请求重定向到app/index.html,除了对/ api的请求.

例如:

http://example.com/categories/electronics/ipod实际上就像去http://example.com/app/index.html/categories/electronics/ipod

我想隐藏app/index.html部分.

然后,对http://example.com/api的请求会有例外,因为我需要向这些url路径发出ajax请求.

感谢您提供的所有帮助/指导.

apache mod-rewrite rewrite angularjs

21
推荐指数
2
解决办法
2万
查看次数

使用angular.js路线手动刷新时仍然会"找不到"

在Angular.js路由上阅读了大量的报告和stackoverflow问题之后,当我进行手动刷新时,我仍然收到"未找到"错误.

脚步:

  1. 浏览到localhost- >因为我的配置(下面),我被带到了localhost/home.视图和一切都很好.
  2. 在浏览器中点击刷新 - >浏览器显示此信息 Not Found: the requested /home is not found on this server

这个问题可能最像刷新页面给出"找不到页面"

我的配置

// Routing configuration.
angular.module('myModule')
    .config(['$routeProvider', '$locationProvider', 
    function ($routeProvider, $locationProvider) {
        // Enable pushState in routes.
        $locationProvider.html5Mode(true);

        $routeProvider
            .when('/home', {
                templates: {
                    layout: '/views/home.html'
                },
                title: 'Welcome!'

            })
            .when('/launchpad', {
                templates: {
                    layout: '/views/layouts/default.html',
                    content: '/views/partials/profile.html'
                },
                title: "Launchpad"
            })
            .otherwise({
                redirectTo: '/home'
            });

    }
]);
Run Code Online (Sandbox Code Playgroud)

我做过的其他事情:

  • 在我index.html,我已经有了<base href="/">
  • 升级到角度1.2.1

这是我尝试过的htaccess规则.没有工作.

刷新页面给出"找不到页面" …

javascript .htaccess angularjs angular-routing

10
推荐指数
2
解决办法
1万
查看次数