zoukankan      html  css  js  c++  java
  • legend2v2---3、The requested URL /index1 was not found on this server

    legend2v2---3、The requested URL /index1 was not found on this server

    一、总结

    一句话总结:

    一般现象:首页能进,其它页不能访问
    问题原因:【apache】服务器设置的问题
    解决方式:项目的【public】目录的【.htaccess】中增加内容

    二、The requested URL /index1 was not found on this server

    Laravel Framework 8.20.1

    1、问题

    一般现象:首页能进,其它页不能访问

    2、解答

    问题原因:apache服务器设置的问题

    解决方式:项目的public目录的.htaccess中增加如下内容

    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews -Indexes
        </IfModule>
    
        RewriteEngine On
    
        # Handle Authorization Header
        RewriteCond %{HTTP:Authorization} .
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_URI} (.+)/$
        RewriteRule ^ %1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    
    </IfModule>
    
    #跨域设置
    #<IfModule mod_headers.c>
    #   Header add Access-Control-Allow-Origin: *
    #</IfModule>
     
  • 相关阅读:
    算法很美(一)
    pytest学习(四)
    pytest学习(三)
    pytest学习(二)
    pytest学习(一)
    HTTP协议详细介绍,面试详全强助攻!
    Docker实战总结
    微信小程序测试整理
    这些用例设计题,你在面试时遇到过吗?
    测试面试题集-Dubbo常见面试题(12)
  • 原文地址:https://www.cnblogs.com/Renyi-Fan/p/14192208.html
Copyright © 2011-2022 走看看