I am creating separate WordPress installations in several subdirectories of one domain.

At first I was getting a 500 Server Internal error.. so I created the .htaccess file and uploaded it to each WordPress installation root.


# BEGIN WordPress
RewriteEngine On
RewriteBase /zingery/wordpress/
RewriteRule . /zingery/wordpress/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]
# END WordPress

Now, when I go to the root directory to complete the WordPress installation, I am redirected back to the parent directory.

Here is a link with the example:


When you click on "zingery" and then "wordpress" it takes you back to /temp

Any idea what is going on?

If you click on "test" in the temp directory it properly displays the index.php file inside that folder (the test directory does NOT contain a WP installation). This implies to me the parent redirect issue is WordPress related.

Can someone help me out?

  • Should be RewriteBase /name-of-folder/ and then RewriteRule . /name-of-folder/index.php [L] Commented May 4, 2016 at 18:30
  • Can you test without that other crap in the .htaccess? Just core WP rules. Commented May 4, 2016 at 18:38

1 Answer 1


For the sake of clarity, this should be your .htaccess

RewriteEngine On
RewriteBase /zingery/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /zingery/wordpress/index.php [L]
  • I updated it to your code and it just redirects back to the /temp directory again now. You can see what I mean with the live link I provided.
    – cpcdev
    Commented May 4, 2016 at 20:54
  • Does it make a difference that WordPress is NOT installed at this point? Only the files are residing on the server
    – cpcdev
    Commented May 4, 2016 at 21:05
  • 1
    As it turns out, my index.php file was somehow mixed with another index.php that contained a header redirect.. which explains why I was being redirected! Thanks for the help
    – cpcdev
    Commented May 4, 2016 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.