Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How to achieve www redirection (301)

ProsperProsper ✭✭
edited June 2015 in Vanilla 2.0 - 2.8

How do I redirect vanilla version 2.1.11 forum installation to http://www (with www) to avoid duplicate content? This will make the forum accessible through a single address. Thank you.

Best Answer

Answers

  • Options
    ProsperProsper ✭✭
    edited June 2015

    @R_J thank you for your response. I was able to do it according to the link you posted. Now the .htaccess looks like this;

    # Original # If you modify this file then change the above line to: # Modified <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^yourwebsite.com$ RewriteRule (.*) http://www.yourwebsite.com/$1 [R=301,L] # Certain hosts may require the following line. # If vanilla is in a subfolder then you need to specify it after the /. # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum) # RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L] </IfModule>

    I hope the above code is the correct code to use to redirect non-www to www

Sign In or Register to comment.