Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP in subfolder: Redirect loop #2

Open
M-Willett opened this issue Oct 2, 2013 · 2 comments
Open

WP in subfolder: Redirect loop #2

M-Willett opened this issue Oct 2, 2013 · 2 comments
Assignees

Comments

@M-Willett
Copy link

Had an issue with this .htaccess causing a redirect loop, just adding the subfolder name wasn't working, the following fixed:

# BEGIN WordPress

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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]
</IfModule>

# END WordPress
@ghost ghost assigned danclong Oct 2, 2013
@bavington
Copy link

Hi Matt, thanks for sharing the feedback. So were you getting a redirect loop on the whole site, or just the back-end?

@M-Willett
Copy link
Author

It was the whole site. However I've just tried to replicate and it's working fine, without adding any directory info. Strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants