标签: http-status-code-404

在此服务器上找不到 /ampps-admin?

使用 OS X 10.9.1 和 AMPPS 2.1(日期为 2013 年 11 月 18 日)我可以启动 Apache 服务器,但是当尝试转到管理或配置页面时,我收到 localhost/ampps-admin 和 localhost/ampps 的 404 错误。

我应该去哪里寻找这个问题?

http-status-code-404

1
推荐指数
1
解决办法
2342
查看次数

带有 404 检测的多个 cURL 下载

我正在尝试编写一个 shell 脚本,使用 cURL 下载文件并检测 url 是否导致 404 错误。如果 url 是 404,那么我想将 url 链接或文件名保存到文本文件中。

url 格式为http://server.com/somefile[00-31].txt

我一直在搞乱我在谷歌上找到的内容,目前有以下代码:

#!/bin/bash

if curl --fail -O "http://server.com/somefile[00-31].mp4"
then
  echo "$var" >> "files.txt"    
else
  echo "Saved!"
fi
Run Code Online (Sandbox Code Playgroud)

bash shell curl http-status-code-404

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

Symfony 的 createNotFoundException 不返回 404 页面

我有一个 Symfony 操作,当查询返回 NULL 时,我试图返回 404 错误。

我总是会返回常规页面的模板和 200 HTTP 返回代码。

我已经检查过,我的错误日志显示 createNotFoundException 正在触发。

我正在运行 Symfony 2.7.1

知道为什么此代码不返回 404 页面吗?

<?php

namespace Example\GroupBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Request;

use Example\GroupBundle\Entity\Group;

/**
 * Class SupportGroupLandingController
 * @package Example\GroupBundle\Controller
 *
 * @Route("/group")
 */
class SupportGroupController extends Controller
{
    /**
     * @Route("/{name}", name="support_group_page")
     * @Method("GET")
     * @Template("ExampleGroupBundle::group_page.html.twig")
     *
     * @param $name
     * @return array
     */
    public function indexAction($name)
    {
        $repo = $this->getDoctrine()->getRepository('ExampleGroupBundle:Group');
        $group = $repo->findOneBy(array('name' => $name));

        if …
Run Code Online (Sandbox Code Playgroud)

http-status-code-404 symfony

1
推荐指数
1
解决办法
4549
查看次数

无法读取未定义的“fn”属性?

在我的 github 页面上获取这些错误代码。我将这些作为加载脚本的顺序:

<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/index.js"></script>
Run Code Online (Sandbox Code Playgroud)

以下是错误消息:

GET https://tmolano.github.io/CareerMod4/node_modules/jquery/dist/jquery.js 404 ()
index.html:115 GET https://tmolano.github.io/CareerMod4/node_modules/popper.js/dist/popper.min.js 404 ()
util.js:56 Uncaught TypeError: Cannot read property 'fn' of undefined
    at util.js:56
    at util.js:10
    at bootstrap.min.js:6
    at bootstrap.min.js:6
(anonymous) @ util.js:56
(anonymous) @ util.js:10
(anonymous) @ bootstrap.min.js:6
(anonymous) @ bootstrap.min.js:6
Run Code Online (Sandbox Code Playgroud)

这是我的页面: https: //tmolano.github.io/CareerMod4/

除了加载顺序之外,还有什么可能导致此问题?

html javascript http-status-code-404

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

如何在 Laravel 5.7 中创建自定义 404 页面?

任何人都可以帮助我在 Laravel 5.7 中创建自定义 404 页面,我是 Laravel 的新手,所以如果您告诉我此流程,那就太好了。

谢谢

http-status-code-404 laravel-5.7

1
推荐指数
1
解决办法
1830
查看次数

Laravel 创建新路由时出现 404 错误

看起来,当我创建新路由时,尝试访问 url 时收到 404 错误,这很有趣。因为我的所有其他路线都运行良好。

我的 web.php 看起来像这样:

Auth::routes();

Route::post('follow/{user}', 'FollowsController@store');

Route::get('/acasa', 'HomeController@index')->name('acasa');
Route::get('/{user}', 'ProfilesController@index')->name('profil');
Route::get('/profil/{user}/edit', 'ProfilesController@edit')->name('editareprofil');
Route::patch('/profil/{user}', 'ProfilesController@update')->name('updateprofil');

Route::get('/alerte', 'PaginaAlerte@index')->name('alerte');
Route::get('/alerte/url/{user}', 'UrlsController@index')->name('editurl');
Route::post('/alerte/url/{user}', 'UrlsController@store')->name('updateurl');
Route::get('/alerte/url/{del_id}/delete','UrlsController@destroy')->name('deleteurl');
Run Code Online (Sandbox Code Playgroud)

当我访问http://127.0.0.1:8000/alerte时不起作用的是:

Route::get('/alerte', 'PaginaAlerte@index')->name('alerte');
Run Code Online (Sandbox Code Playgroud)

控制器看起来像这样:

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Auth;

class PaginaAlerte extends Controller
{
    public function __construct() {
        $this->middleware('auth');
    }

    public function index(User $user)
    {
        return view('alerte');
    }
}
Run Code Online (Sandbox Code Playgroud)

我正在摇头,因为我看不出问题所在。这还不是一个实时网站,我只是在我的 Windows 10 电脑上使用 WAMP 进行开发。

php http-status-code-404 laravel

1
推荐指数
1
解决办法
7931
查看次数

Typo3 9 Ajax请求,页面类型返回404

我的网站有一个使用 AJAX 嵌入的搜索过滤器表单。当我使用简单类型参数访问页面时,它会返回内容,但是当我尝试使用 GET 传递其他参数时,它会显示 404。 示例: http://www.website.com/?type =871 (它显示默认内容) http://www.website.com/?type=871&controller=abc(返回404)

Jquery Ajax 代码

 $.ajax({
                    type: 'GET',
                    url: $(this).attr('action') + '?type=871',
                    data: $(this).serialize(),
                    success: function (data) {
                        $('#searchresults').html(data);

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

打字稿代码

  mlAjax = PAGE
mlAjax {
    typeNum = 871
}

    [globalVar = GP:type = 871]
        config {
            disableAllHeaderCode = 1
            xhtml_cleaning = 0
            admPanel = 0
            debug = 0
            no_cache = 1
        }

        tt_content.list.10 >

        // Insert content that can handle the request
        mlAjax {
            10 = …
Run Code Online (Sandbox Code Playgroud)

ajax typo3 http-status-code-404

1
推荐指数
1
解决办法
3903
查看次数

ASP.NET Core 5.0 Web 应用程序 - 将开箱即用的应用程序发布到来自 wwwroot 的静态文件上的 IIS Server 404

创建了一个开箱即用的 ASP.NET Core 5.0 Web 应用程序 - 在本地运行得很好。

将项目发布到文件夹并将内容复制到运行 IIS 的 Windows Server 2019。

安装了ASP.NET Core 5.0 运行时 (v5.0.5) - Windows 托管捆绑包。

应用程序池:.NET CLR版本:为无托管代码管理,管道模式:为集成

项目文件包含:

public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<Startup>();
                    webBuilder.UseStaticWebAssets();
                });
Run Code Online (Sandbox Code Playgroud)

启动包含:

            app.UseStaticFiles();
Run Code Online (Sandbox Code Playgroud)

引用时,wwwroot 文件夹下的所有内容都会抛出 404 错误:

https://servername.test.com/subapplication/css/site.css
Run Code Online (Sandbox Code Playgroud)

默认页面确实已加载,只是由于未找到文件而没有样式。

默认

static-files http-status-code-404 asp.net-core-5.0

1
推荐指数
1
解决办法
2563
查看次数

mod_rewrite和.htaccess 404ing在一个子目录中

例如:

Dir结构

localhost/
 |- test/
    |- index.php
    |- .htaccess
Run Code Online (Sandbox Code Playgroud)

index.php:

 <?php
        if(isset($_GET['cmd'])){
            echo "cmd is ok";
        }
 ?>
Run Code Online (Sandbox Code Playgroud)

的.htaccess

RewriteEngine On
RewriteRule ^([^/]*)/$ /test/index.php?cmd=$1 [L]
Run Code Online (Sandbox Code Playgroud)

如果用户设置: http://localhost/test/index.php?cmd=a

输出将是: cmd is ok

那没问题!

如果用户设置,我想得到相同的结果http://localhost/test/a

应该如何设置.htaccess/mod_rewrite?

有了代码,我只得到404.

php apache .htaccess mod-rewrite http-status-code-404

0
推荐指数
1
解决办法
337
查看次数

Golang Web服务器不提供静态文件

我很确定我忽略了一些显而易见的事情,但我不确定是什么.我正在构建一个简单的Web应用程序,提供模板化的书籍页面.模板工作正常,图像的路径似乎正确填充,但我不断为图像本身收到404错误.

这是模板:

<h1>{{.Title}}</h1>
<h2>{{.Author.Name}}</h2>
<image src="../images/{{.ImageURI}}" />
Run Code Online (Sandbox Code Playgroud)

这是应用程序本身:

package main
import (
    "html/template"
    "log"
    "net/http"
    "time"

    "github.com/gorilla/mux"
    "github.com/user/marketplace/typelibrary"
)

var books []typelibrary.Book

func ItemHandler(w http.ResponseWriter, r *http.Request) {
    params := mux.Vars(r)
    var selected typelibrary.Book       
    //Retrieve item data
    for _, item := range books {
        if item.ID == params["id"] {
            selected = item
            break
        }
    }
    t, _ := template.ParseFiles("./templates/book.html")
    t.Execute(w, selected)
}

func main() {
    router := mux.NewRouter()
    books = append(books, typelibrary.Book{ID: "1", Title: "The Fellowship of the Ring", ImageURI: …
Run Code Online (Sandbox Code Playgroud)

webserver static-files go http-status-code-404

0
推荐指数
1
解决办法
1901
查看次数