0

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

1 Answer 1

1

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]
4
  • 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 Commented May 3, 2011 at 23:02
  • I'm assuming you've set your General Settings -> Site address and WordPress address to example.com?
    – Brooke.
    Commented May 4, 2011 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 Commented May 4, 2011 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.
    Commented May 6, 2011 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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