. Htaccess domain name rewriting problem? For example, the same php space is supported and two domain names www.aaa.com and www.bbb.com are bound at the same time. if the space contains at least the following files and directories (folders): (note: Is there a problem about rewriting the domain name of javasr. htaccess?
For example, the same php space is supported and two domain names www.aaa.com and www.bbb.com are bound at the same time;
Assume that the space contains at least the following files and directories (folders ):
(Note: The directories or files under the root directory and the file names under bbb may be the same, but the content may not be the same. all files cannot be shared)
Index. php
Text/about.html
Tp/logo.jpg
Aaa. php
Error.html
Robots.txt
Bbb/index. php
Bbb/text/about.html
Bbb/tp/logo.jpg
Bbb/bbb. php
Bbb/error.html
When you use an aaa.com or www.aaa.com domain name to start accessing, the access is normal.
(Directly access the Directory, file, and home page under the root directory of the space without rewriting), for example:
Point to the index. php page when the http://www.AAA.com or http://aaa.com is accessed,
If you want to directly access the files in the corresponding folder under the root directory,
For example, the http://www.aaa.com/text/about.html is also the about.html page under the textfile folder under the root directory,
Click the link on the page;
When you use a domain name starting with bbb.com for access, rewrite (point to) all directories or files in the bbb folder of the root directory. for example:
When accessed with a http://www.bbb.com or http://bbb.com, the address bar appears as a http://www.bbb.com (domain display unchanged) but the actual access is the bbb/index. php page;
To access the directory or file in a format similar to http://www.bbb.com/directory/directory/file name, rewrite (point to) the directory or file in the bbb folder of the root directory;
For example:
When the http://www.bbb.com/bbb.php address bar is displayed as a http://www.bbb.com/bbb.php (the domain name is displayed unchanged) but the actual access is the http://www.bbb.com/bbb/bbb.php page;
When the http://www.bbb.com/text/about.html address bar is displayed as a http://www.bbb.com/text/about.html (the domain name is displayed unchanged) but the actual access is the http://www.bbb.com/bbb/text/about.html page;
This type of push is intended;
The link and address on the page are also normal, and are the corresponding pages or files under the bbb directory;
It is best to refer the corresponding error.html page when there is no matching page;
For example, when the http://www.bbb.com/aaa.php is used because it is rewritten to the bbb/folder without the aaa. php file (although this file is available in the root directory), it will jump to the bbb/error.html page ??
There will always be problems with what you learn to write or copy online,
Hope you will receive your advice !!!
------ Solution --------------------
You don't know what you want
What url do you want to change?
------ Solution --------------------
Create a. htaccess file in the bbb folder
RewriteEngine on
RewriteRule ^ bbb/bbb. php $ bbb. php