Method 1:
I think everyone knows this method! It is a traditional method officially taught! Is the domain name binding directory method!
1. Bind www.111cn.net to the shop directory under the root directory!
2. You can bind the root directory with the root domain 111cn.net!
3. Bind other folders to ** .111cn.net! Prefix!
4. After The directory is bound! Modify the bound domain name in config. ini. php.
This is Method 1: It is a bit true to remove shop! But when I access the store with a second-level domain name! Shop will still appear in the suffix! No solution!
Note: replace 111cn.net with your own domain name
........................................................................................................................ ............
Method 2:
This method is time-consuming and laborious to modify! So I try my best to explain it in detail!
In order to make the www domain name perfect enough to use! Please take the following steps as a step by step!
1. Transfer the directory file under the shop to the root directory
2. Modify the shop bound domain name in config. ini. php to the no shop directory.
3. Change index. php of the original root directory to the file name of main. php! Modify the index. php code (index. php = main. php) as follows! What do you change to main. php ):
$ Site_url = strtolower ('http ://'. $ _ SERVER ['http _ host']. substr ($ _ SERVER ['php _ SELF '], 0, strrpos ($ _ SERVER ['php _ SELF'], '/index. php ')). '/shop/index. php '); @ header ('Location :'. $ site_url );
Change
$ Site_url = strtolower ('http ://'. $ _ SERVER ['http _ host']. substr ($ _ SERVER ['php _ SELF '], 0, strrpos ($ _ SERVER ['php _ SELF'], '/main. php ')). '/index. php '); @ header ('Location :'. $ site_url );
4. Do you think it is very simple? I want to ask if there are any other operations. What I want to say is, no more! That's all!
Well, the above is the tutorial compiled for everyone. For other questions, please continue to pay attention to 111cn.com.