Integrate your site entrance

xiaoxiao2021-03-06  17

Integrate your site entrance

Everyone may often see this path on the Internet (

Http://www.aaa.com/aaa/bbb/aaa?id=5), make people don't understand, such a website implementation has several possibilities:

1. The extension of the hidden file is the benefits of this practice, and there is no need for personal feelings.

2. Use the redirection rules of the website to realize the virtual path;

3. Improve the virtual path in the way for mandatory file parsing.

Use the second third method to realize the unified interface of the website, a reasonable integrated website, better refer to the security and architecture of the website, most of the two ways of the website is built and implemented using the "MVC" mode.

Below is an example

The access path is as follows:

... / TEST / ******* / BAD ... / TEST / ******* / Good ("******" can be used Character string replace, "......." is your web path)

The directory structure of the file is as follows

| -. HTACCESS | - TEST | - Application.php | - Controler / GoodControl.php | - Controler / BadControl.php

Note that the file ".htaccess", can be created directly under Windows, can be created in command line mode.

File 0 (.htaccess) (this file is used to change the Apache configuration)

forceType Application / X-httpd-php

Document 1 (Test.php)

parse (); $ aa-> go ();?>>

File 2 (GoodControlr.php)

File 3 (BadControlr.php)

Document 4 (Application.php)

转载请注明原文地址:https://www.9cbs.com/read-45441.html

New Post(0)