Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter tomelk31

    (@tomelk31)

    Or is there anything I can add to the .htaccess file?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    As long as the old web server at chelseatalk.co.uk is not actually the same as the new www.chelseatalk.co.uk, then you can do it with .htaccess like so

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule (.*) http://chelseatalk.co.uk/$1 [R=301,L]
    </IfModule>

    If it is the same server and directory it’s even easier.

    Set your WordPress Address (URL) and Site Address (URL) to the www version, then anyone visiting http://chelseatalk.co.uk should get rewritten automatically by WordPress to http://www.chelseatalk.co.uk.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    NUTS. I’m really providing poor advice about .htaccess lately. I blame coffee deprivation.

    That RewriteRule should read like so

    RewriteRule (.*) http://www.chelseatalk.co.uk/$1 [R=301,L]

    That way people visiting the non-www version of that page will be sent to the www version via a 301 redirect.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘301 Redirect’ is closed to new replies.