WordPress.org

Support

Support » Multisite » [Resolved] Redirects without www. only go to home page

[Resolved] Redirects without www. only go to home page

Viewing 5 replies - 1 through 5 (of 5 total)
  • WPtesting
    Member

    @wptesting

    if you don’t include www. then it just takes you to the home page and not the specified page.

    It’s totally opposite of what you are saying…
    Your site is working fine with non-www, the problem is with www.

    Check your .htaccess code whether there any weird redirection.
    Are you using any kinda plugin, for redirection? if yes, the plugin might be responsible for this issue.

    johnnyflash
    Member

    @johnnyflash

    Sorry for the confusion. You’re right, I had it backwards. I’ll check the .htaccess file. How would I do the redirects in WP without using a redirect plug-in? Some of the redirects are to internal pages and others are to outside addresses. Thanks in advance.

    johnnyflash
    Member

    @johnnyflash

    This is my .htaccess file, see anything unusual?

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    WPtesting
    Member

    @wptesting

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.fairfax.cc$ [NC]
    RewriteRule ^(.*)$ http://fairfax.cc/$1 [R=301,L]

    Add this rewrite rule on the top of your .htaccess file.

    johnnyflash
    Member

    @johnnyflash

    That did the trick! You are awesome! Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Redirects without www. only go to home page’ is closed to new replies.