yayitswei
Member
Posted 1 year ago #
Hello, I'm using WP 3.0 multisite and trying to change one of my sites to www from non-www using the domain name mapper plugin. The www domain now works (http://www.toptenmba.org/) but the non-www redirects to my site #1 (http://toptenmba.org goes to http://www.hyperinkpress.com/). How do I make http://toptenmba.org point to http://www.toptenmba.org/?
I'm using the default htaccess, subfolder version, mentioned in the Codex-- which is excellent, by the way.
Thank you!
yayitswei
Member
Posted 1 year ago #
By the way, I looked at this previous thread, which got me started by suggesting I change the domain name in the mapping plugin to include the www.
As far as I know, it doesn't solve my problem which is that non-www urls aren't redirecting correctly to their www versions.
studyguidevn
Member
Posted 1 year ago #
You should put those code in your .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
Remember:
replace "yourdomain.com" with your own domain
put it right after the `RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]`
After that, you can check it at
http://www.stepforth.com/resources/server-header-checker-tool
If your http://toptenmba.org return is 301 redirect so that is done well.
Be careful as tweak the .htaccess file can cause some serious trouble with your MU setting. If you need further information, contact me at my blog : http://nguyenkhanhlam.com
yayitswei
Member
Posted 1 year ago #
Thanks for your reply! I'm using multisite (I have about 10 possibilities for yourdomain.com), so the solution I ended up going with was to add both mydomain.com and http://www.mydomain.com into the MU Domain name plugin, and mark the www version as primary.
My httaccess file looks like that
# BEGIN WordPress
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
if I add
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^example\.com
RewriteRule (.*) http://example.com/$1 [R=301,L]
it will crash the site and a message comes up saying that the page isn't redirecting properly...what have I've done wrong?
studyguidevn
Member
Posted 1 year ago #
Sorry,
I don't know what you mean by "add". I you remain you .htaccess the same (without any removal), I think it would have trouble. Or, If you mean by replace by the new one, tell me?
vfundude62
Member
Posted 4 months ago #
thanks i have solved same problem which is with my site now its work good.
http://www.vfundude.com/