简体   繁体   中英

How do I stop wordpress redirecting from subdomain to primary?

I want to have 2 versions of the site. A testing/development version, and a public, live version. When I try to go to dev.mysite.com, it just redirects to www.mysite.com.

I completely deleted the .htaccess files and that did nothing, so it must be somewhere in wordpress's files. Has anyone ever done this before? There's so many includes in the core files, I'm getting lost.

It's fine if the site uses the same database, I just want to be able to essentially have a "breakable" site that the general users can't see.

Does anybody know where I would need to make a change to keep it from redirecting?

Add these 2 lines in your wp-config.php :

define('WP_HOME','http://dev.mysite.com');
define('WP_SITEURL','http://dev.mysite.com');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM