Implemented 301 Direct WWW To Non WWW (and vice versa)

Brent W

Well-known member
Licensed customer
Wordpress has a great feature that takes your wordpress url and automatically redirects to that.

So if I were to use http://www.mysite.com has my board url, http://mysite.com would automatically be 301 redirect to http://www.mysite.com.

Works the other way as well.

This will be a nice easy SEO enhancement for everyone and will not require any .htaccess edit to make it happen.
 
Upvote 10
This suggestion has been implemented. Votes are no longer accepted.
It uses htaccess rewrites to achieve that :) You can do the same.

I realize how to do it via .htaccess (for the second time now). This is more of a user friendly request for others (and to save me time from having to find the two lines I need for each site I buy / purchase / create).

Its a small request but something that if worked out of the box would benefit everyone. I run into sites all the time that do not take advantage of this.
 
I realize how to do it via .htaccess (for the second time now). This is more of a user friendly request for others (and to save me time from having to find the two lines I need for each site I buy / purchase / create).

Its a small request but something that if worked out of the box would benefit everyone. I run into sites all the time that do not take advantage of this.
Wordpress has the "two lines" in it's database and it automates the process by injecting the code into the .htaccess file. It also requires a 666 permission on that file.
BTW, Wordpress has that feature because no .htaccess files are attached with the script package and creating it is optionally. While xenForo contains it by default as I know so no need to inject the rules to the .htaccess files when the admin want to change how URLs look.
 
Wordpress has the "two lines" in it's database and it automates the process by injecting the code into the .htaccess file. It also requires a 666 permission on that file.
BTW, Wordpress has that feature because no .htaccess files are attached with the script package and creating it is optionally. While xenForo contains it by default as I know so no need to inject the rules to the .htaccess files when the admin want to change how URLs look.
Would it work if you are using Nginx, Litespeed,.. ? Because these servers do not use .htaccess.
 
Back
Top Bottom