Now I need to change the site under Xampp/htdocs/zm to d:/lyh/webhome Directory Access, the original access path is HTTP://LOCALHOST/ZM, now is HTTP// Www.yihui.com, first I need to configure a virtual site under XAMPP
Modify the http.conf, http-vhosts.conf, and hosts files separately, adding
Http.conf
<*:80> ServerAdmin [email protected] DocumentRoot "d:/lyh/ Webhome " ServerName yihui.com serveralias www.yihui.com errorlog" Logs/yihui.com-error.log " Customlog "Logs/yihui.com-access.log" common</VirtualHost>
Http-vhosts.conf
<"d:/lyh/webhome"> Options Indexes followsymlinks includes execcgi allowoverride All Require all granted</Directory>
Hosts
127.0.0.1 www.yihui.com
After the normal access to the dedecms backstage, but the front desk has a problem, you need to modify the content in the background
In the system-〉 system basic parameters-〉 Site Settings
-〉 core settings for System-〉 system basic parameters
Then the front desk can access, but there are problems, all the picture path is wrong , there is still a "/zm/" in front of the path
Originally these URLs are written in the database solidified, need to modify the database of several tables , they are
- Atlas Thumbnail chart name dede_uploads field URL;
- Picture of the Channel article List thumbnail chart name dede_archives field Litpic
- News article internal picture table name dede_addonarticle field body
- Picture table name dede_addonimages field Imgurls inside the Atlas article
Replace "/zm/uploads" in these fields with "/uploads"
There are many ways to replace, you can perform SQL substitution in the database, or you can do it in the DEDECMS background core-〉 database content substitution.
Once these fields have been replaced, the site can be rebuilt to the background, and the Web site will have normal access to the
Dedecms access to the root directory is modified by subdirectory access