Ask the question page address and add a slash to it to view it normally. what is the problem?

Source: Internet
Author: User
Ask the question page address and add a slash to it to view it normally. what is the problem? 127.0.0.1/index. php
This is normal access

You can also access it by adding a slash, but the whole page is distorted. what is the situation?
Example: 127.0.0.1/index. php/

I don't know how to add a slash or access it. why is an error reported directly?


How can we judge whether there is a slash behind it?


Reply to discussion (solution)

If index. php exists, you can add anything to it.
Is the path with the "/" style changed?

$ _ SERVER ['path _ info']

You can obtain additional path information.

Both index. php and login. php are the same. you can access them by adding "/".
However, CSS styles are lost, and strange la s appear.

How can we eliminate it?

You can remove the last slash (/) and use rewrite.

Both index. php and login. php are the same. you can access them by adding "/".
However, CSS styles are lost, and strange la s appear.

How can we eliminate it?


#3

It is a matter of server software.
If your style is lost, it indicates that the reference addresses of css and other static files are not standard and only suitable for the current development environment.

The css js path should not be affected by the page path. does your css path read the page path rather than set constants or use relative paths?
If so, modify it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.