WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] All pages on multisite redirect to homepage w/o www (3 posts)

  1. l0gan0
    Member
    Posted 1 year ago #

    ** EDIT **
    It turns out it was htaccess file.
    Two things to keep in mind if you're having this problem:

    • Each host has a different way of rewriting the domain. Google search your host and you should be able to find it. Otherwise just call your host.
    • Make sure that you place that redirect ABOVE WP stuff in the htaccess file.

    Hope this helps!

    ----
    Original post:

    I have one a mess of a multisite install.

    I recently turned my new site live, moving my multisite from dev.example.com to http://www.example.com. All went smoothly, except one little thing. If you try to go to a page without the www subdomain, it redirects me to the main blog's homepage.

    I assumed this was an .htaccess problem. After searching and trying different things for 12 hrs, I finally caved and called for tech support. He assumed .htaccess file too, but despite everything we tried, it simply would not work properly.

    He suggested that I download my sql database, and do a find [www.example.com] and replace [example.com] and see if that worked. Well, in short, I now have a terribly messed up multisite install.

    Has anyone ran into similar problems? Does anyone know if there is a place in the sql file that may have required both the www and non-www url? My assumption is that when I did the find and replace, it replaced something it shouldn't have.

    Thoughts?

  2. drmen8x
    Member
    Posted 1 year ago #

    I've the same problem. When i click to any pages it always display home page.

    Here is my wp-config.php

    /* Multisite */
    define('WP_ALLOW_MULTISITE', true); 
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/hth/';
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/hth/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    and here is my .htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /hth/
    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]
    </IfModule>
    
    # END WordPress

    http://localhost/hth/about/ or http://localhost/hth/contact/ or any pages it display only home page screen.

    Anybody can help me?

  3. drmen8x
    Member
    Posted 1 year ago #

    if i set permalink default it display true, else it display home page screen.

Topic Closed

This topic has been closed to new replies.

About this Topic