关于url的解析问题
正常
出错
谁能解释下原因吗,为什么多个斜杆,结果就不大不同。
回复讨论(解决方案)
路径问题,要么用完整路径。
最前的/代表从网站根目录开始寻址
www.zjxm.com/index.php/
在这个页面下。
如果url是/index.php/Admin/Index/admin_top 就是访问 www.zjxm.com /index.php/Admin/Index/admin_top
如果url是index.php/Admin/Index/admin_top,因为没有最前的/,就会从当前目录寻址,即www.zjxm.com/index.php/ index.php/Admin/Index/admin_top
最前的/代表从网站根目录开始寻址
www.zjxm.com/index.php/
在这个页面下。
如果url是/index.php/Admin/Index/admin_top 就是访问 www.zjxm.com /index.php/Admin/Index/admin_top
如果url是index.php/Admin/Index/admin_top,因为没有最前的/,就会从当前目录寻址,即www.zjxm.com/index.php/ index.php/Admin/Index/admin_top
但是,为什么在浏览器中去掉斜杆\,又好使了呢。对比上边 第二个图
最前的/代表从网站根目录开始寻址
www.zjxm.com/index.php/
在这个页面下。
如果url是/index.php/Admin/Index/admin_top 就是访问 www.zjxm.com /index.php/Admin/Index/admin_top
如果url是index.php/Admin/Index/admin_top,因为没有最前的/,就会从当前目录寻址,即www.zjxm.com/index.php/ index.php/Admin/Index/admin_top
但是,为什么在浏览器中去掉斜杆\,又好使了呢。对比上边 第二个图
因?最后加?/,作?目?,表示?前目?是www.zjxm.com/index.php/ 如果不加/ 表示?前目?是 www.zjxm.com/
因???器??取最後一?/作?最??的目?。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In-depth analysis of the role and application scenarios of HTTP status code 460 HTTP status code is a very important part of web development and is used to indicate the communication status between the client and the server. Among them, HTTP status code 460 is a relatively special status code. This article will deeply analyze its role and application scenarios. Definition of HTTP status code 460 The specific definition of HTTP status code 460 is "ClientClosedRequest", which means that the client closes the request. This status code is mainly used to indicate

iBatis and MyBatis: Differences and Advantages Analysis Introduction: In Java development, persistence is a common requirement, and iBatis and MyBatis are two widely used persistence frameworks. While they have many similarities, there are also some key differences and advantages. This article will provide readers with a more comprehensive understanding through a detailed analysis of the features, usage, and sample code of these two frameworks. 1. iBatis features: iBatis is an older persistence framework that uses SQL mapping files.

Detailed explanation of Oracle error 3114: How to solve it quickly, specific code examples are needed. During the development and management of Oracle database, we often encounter various errors, among which error 3114 is a relatively common problem. Error 3114 usually indicates a problem with the database connection, which may be caused by network failure, database service stop, or incorrect connection string settings. This article will explain in detail the cause of error 3114 and how to quickly solve this problem, and attach the specific code

The reason for the error is NameResolutionError(self.host,self,e)frome, which is an exception type in the urllib3 library. The reason for this error is that DNS resolution failed, that is, the host name or IP address attempted to be resolved cannot be found. This may be caused by the entered URL address being incorrect or the DNS server being temporarily unavailable. How to solve this error There may be several ways to solve this error: Check whether the entered URL address is correct and make sure it is accessible Make sure the DNS server is available, you can try using the "ping" command on the command line to test whether the DNS server is available Try accessing the website using the IP address instead of the hostname if behind a proxy

Differences: 1. Different definitions, url is a uniform resource locator, and html is a hypertext markup language; 2. There can be many urls in an html, but only one html page can exist in a url; 3. html refers to is a web page, and url refers to the website address.

Analysis of new features of Win11: How to skip logging in to a Microsoft account. With the release of Windows 11, many users have found that it brings more convenience and new features. However, some users may not like having their system tied to a Microsoft account and wish to skip this step. This article will introduce some methods to help users skip logging in to a Microsoft account in Windows 11 and achieve a more private and autonomous experience. First, let’s understand why some users are reluctant to log in to their Microsoft account. On the one hand, some users worry that they

[Analysis of the meaning and usage of midpoint in PHP] In PHP, midpoint (.) is a commonly used operator used to connect two strings or properties or methods of objects. In this article, we’ll take a deep dive into the meaning and usage of midpoints in PHP, illustrating them with concrete code examples. 1. Connect string midpoint operator. The most common usage in PHP is to connect two strings. By placing . between two strings, you can splice them together to form a new string. $string1=&qu

Wormhole is a leader in blockchain interoperability, focused on creating resilient, future-proof decentralized systems that prioritize ownership, control, and permissionless innovation. The foundation of this vision is a commitment to technical expertise, ethical principles, and community alignment to redefine the interoperability landscape with simplicity, clarity, and a broad suite of multi-chain solutions. With the rise of zero-knowledge proofs, scaling solutions, and feature-rich token standards, blockchains are becoming more powerful and interoperability is becoming increasingly important. In this innovative application environment, novel governance systems and practical capabilities bring unprecedented opportunities to assets across the network. Protocol builders are now grappling with how to operate in this emerging multi-chain
