Support » Fixing WordPress » Error with .htaccess on multiple wordpress installations

  • Good afternoon wordpress community!

    I’m having problems with url rewrite in a project.

    Today, we have a project recently migrated in http://www.fgm.ind.br.

    Within http://www.fgm.ind.br/site, we have a second installation of wordpress. The problem is that when I enable URL writing, when I visit any link within /site, I get an error message (404) with the root site theme, such as: https://www.fgm.ind. br/site/events/

    I have already cleaned the htaccess files of both projects, then I activated the rewriting of URLs only in the root site, and I am still facing the problem. I also restarted apache on the server after each of these attempts.

    The server uses bitnami, if that information helps in any way. It is worth mentioning that they are independent installations with independent databases, not a Multisite.

    I would like guidance on how to resolve this issue by managing to keep the rewritten URLs in the root and other installation on /site

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Did you tried manually changing the .htaccess config?

    https://gist.github.com/domantasg/c68a3e8d180006efde3e5797a89e738f

    Also, when you activate multi-site, backend panel will ask you to change your config to a sample he writes on the backend screen.

    Thread Starter maiconpassos

    (@maiconpassos)

    Didn’t tried it yet, but the point is i really need separate websites with distinct themes, plugins and functions, diferent from the way a Multisite works i think.

    This is the actual code from root .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    And from /site .htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /site/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /site/index.php [L]
    </IfModule>

    # END WordPress

    I should implement the code you send on root .htaccess?

    Thanks, and sorry for bad english 🙂

    It looks like the site in root works just fine so leave it alone!

    The site in subdirectory looks like your site in the root. Did you just create a new install or did you migrate root’s install to the ‘site’ directory? Migration can require further tweaking starting with toggling the permalinks and hopefully, WordPress can then figure that out and rewrite its own htaccess file for site’s subdirectory or else it will supply you with a new copy if it can’t.

    Set permalinks to plain and save then set them to what you really want and save again.

    Since you’ve already started down this path I’d stay the course and not consider multisite at all… just forget any multisite suggestions for now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error with .htaccess on multiple wordpress installations’ is closed to new replies.