• One of the features listed for the plugin is being able to add www to URL’s (or rather, force a redirect). Just wondering if someone could let me know what I actually have to do to get this working.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you figured this out yet? I’m trying to do the same thing.

    Thread Starter garry12

    (@garry12)

    Still haven’t got this, can anyone help?

    Redirection mostly works with the content of the URL after the domain name, so I’m not sure how you’d do it unless you’re using it to modify your .htaccess file.
    This guy has a nice little writeup: https://www.trevorfitzgerald.com/2007/03/force-www-using-an-htaccess-301-redirect/
    To summarize if his site goes away, you need to

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^trevorfitzgerald.com [NC]
    RewriteRule ^(.*)$ https://www.trevorfitzgerald.com/$1 [L,R=301]

    The “%{HTTP_HOST} ^” on the second line says basically “if an inbound connection starts with my domain name without www, match this rule.” The next line rewrites the incoming request by changing the inbound host name and adding the rest of the original URL onto it.

    fencepost

    That code certainly makes it happen in 2.6, but its looking like no in 2.8, does anyone have functional code or a workaround to the bug?

    The .htaccess rule above is not related to WordPress and so will work regardless of WordPress version.

    Redirection has an option when configuring modules to canonicalize your domain.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Redirection] add www to URL’ is closed to new replies.