Support » Networking WordPress » .htaccess redirect weirdness from blogs.dir/#/files

  • Resolved WStringer2

    (@wstringer2)


    I have a fully functioning WPMU instance running a few sites using the sub-folder method. The .htaccess file in /var/www/html is configured per the WP codex and is working fine. I have also confirmed that “AllowOverride” is set to All.

    On one of my sites, I want to redirect a sub-folder of the “files” directory to the Amazon S3. I’ve added an .htaccess file to:
    wp-content/blogs.dir/5/files/2011 to handle the redirect.

    If I visit an image directly it works, the redirect fires and the image is served from the S3:
    server/wp-content/blogs.dir/5/files/2011/10/image.jpg

    However, if I access the same image using the standard WPMU convention, it fails:
    server/sitename/files/2011/10/image.jpg

    Does this have to do with “chaining” .htaccess redirects? Any suggestions would be greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    No, it has to do with WordPress’s .htaccess.

    Since you’re using subfolders, you should add in a redirect rule to the MAIN .htaccess, above the WordPress calls.

    if ^sitename/files/2011/*
    then S3

    Worked like a charm…thanks Ipstenu!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘.htaccess redirect weirdness from blogs.dir/#/files’ is closed to new replies.