OK so i am drawing a blank. I have setup a WordPress 3.1.2 Network site and want the main site to appear with www.mydomain.com not mydomain.com and i can get that to work but the back-end on the network admin breaks when i go to add a site it gives me the error "Are you sure you want to do this".

When i disable the redirect of non-www to www it works fine. I have setup the wp_options table with site home and url of www.mydomain.com so i do not get this at all. I had it working in 3.0 but now 3.1 not working


Where are you trying to do the force redirect? I think the best place for this may be in a .htaccess file. Something like

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]
| improve this answer | |
  • I have tried that and the network admin gets broken and if i redirect to www i need to tell wordpress that the main url is now www.mydomain.com or it will think that www is a sub-site – xLRDxREVENGEx May 3 '11 at 23:02
  • I'm assuming you've set your General Settings -> Site address and WordPress address to example.com? – Brooke. May 4 '11 at 18:07
  • i have tried it both way's with my settings at www.mydomain.com and the rewritecode in .htaccess and domains at mydomain.com and the rewritecode in .htaccess – xLRDxREVENGEx May 4 '11 at 19:18
  • humm... I just had to change BOTH the url settings in my general settings and it worked like a charm. Try removing (or renaming/backup) your .htaccess file. Change your general URL settings and then regenerate permalinks. – Brooke. May 6 '11 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.