• Resolved aeonx

    (@aeonx)


    The issue:

    When you instal multisite on localhost you’ll usually get an infinit loop redirect when accesing new sites admin pannel and the new site won’t load styles.

    The common solution:

    Is to set this in you .htacces file

    RewriteEngine On
    RewriteBase /sitename/
    RewriteRule ^index\.php$ - [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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    After tweaking this in so many ways, it still doesnt work.

    The definitive solution:

    The real trouble is that the .htaccess file is disabled by AllowOverride Setting so wordpress is ignoring whatever rule you set.

    To solve this, find the Apache configuration file httpd.conf and change AllowOverride None to AllowOverride All, that’s it, whatever rule you set on the .htacces file will take effect.

    Note that I was trying to set AllowOverride All directly on the .htacces file but the httpd.conf file has already set this to None so “No new rule will apply”

    You may have to stop-start the sever after doing this. I’m not shure.

    Im using bitnami wampstack. If you got many modules instaled on your sever, for instance Ive got joomla, prestashop, others, and 3 modules of wordpress. In the module’s folder its another folder called conf and inside there is a file called httpd-app.conf wich is a short version of the config file for the server just for that module, You can change AllowOverride None to AllowOverride All there.

    I hope this is usefull for somebody, because It took me a while to find the solution and could’t found any article talking about the httpd.conf file issue.

    Just a reference here: Here

    This may work for any issue regarding to .htaccess file, I guess.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multisite on localhost Infinite Loop definitive solution’ is closed to new replies.