Forums

How do I get WP Multisite to regenerate the .htaccess file? (15 posts)

  1. TonyVitabile
    Member
    Posted 1 year ago #

    I have reason to believe the htaccess file for my site is not right. I have gone to the Permalinks page under settings & have changed the value & saved the page. There was no change made.

    Am I just not waiting long enough?

    Tony

  2. It doesn't work like that on MultiSite. You have to edit it manually.

    What's in your .htaccess for MultiSite? We can help you :)

  3. TonyVitabile
    Member
    Posted 1 year ago #

    ipstenu:

    Here it is:

    RewriteEngine On
    RewriteBase /worship/
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    The reason I believe this is incorrect is because I'm using the NexGen Gallery plugin & none of the images in it are displaying. They used to work fine in the past. When I click on one of the images, the URL that displays has the full physical path to the file:

    http://churchonhigherground.org/worship/wp-content/blogs.dir/files/gallery_name/image.jpg

    This gives me a 404 error. But if I edit that url & change it to:

    http://churchonhigherground.org/worship/files/gallery_name/image.jpg

    I get the picture.

    BTW I'm not using subdomains. Each blog is in it's own folder.

    Another weird thing. I went to the Super-Admin menu & clicked on Sites, then I clicked the edit link for the primary blog. I didn't make any changes, but I did click on Update Options. I got a 404 error after I did that.

    Thanks for your help

    Tony

  4. http://churchonhigherground.org/worship/wp-content/blogs.dir/files/gallery_name/image.jpg should be http://churchonhigherground.org/worship/wp-content/blogs.dir/1/files/gallery_name/image.jpg (where 1 is the blog number...)

    But. Your .htaccess looks like the old one for WPMU.

    Try this.

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /worship/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>
  5. TonyVitabile
    Member
    Posted 1 year ago #

    I tried it & still no joy. The website was created a year ago using WPMU, so that's probably where the .htaccess file came from.

    I originally set every blog up to use its own virtual folder. Are you telling me that Multisite doesn't support that configuration any more?

    Tony

  6. No, WordPress DOES support the subfolders :) It's just yours is ... pointing weirdly.

    If you look on your server, you should see the files in worship/wp-content/blogs.dir/<blog number>/files/

    Are they there?

  7. TonyVitabile
    Member
    Posted 1 year ago #

    Yes, they're all there:

    /blogs.dir/1/files/...
    /blogs.dir/5/files/...

    and others.

    But I'm still not seeing the images with the links generated by NexGen

  8. Andrea_r
    team pirate
    Posted 1 year ago #

    But I'm still not seeing the images with the links generated by NexGen

    then that's a plugin issue.

  9. TonyVitabile
    Member
    Posted 1 year ago #

    I figured it was; I just wanted to make sure the htaccess was OK, and apparently it wasn't. I have posted a request for help for the plugin in the Plugins and Hacks forum. I haven't heard back yet.

    Is there any sense in blowing away the wp-config.php file & going through the initial install process again? I've kept that file unchanged when I deleted all of the files & uploaded from a new download of WP 3.0.1.

    By the way, is the version of WP that you get when you click on the "Download 3.0.1" button Multisite? I'm seeing the Super-Admin menu in the admin pages, just not sure if suddenly I have the right software running.

    thanks

    Tony

  10. By the way, is the version of WP that you get when you click on the "Download 3.0.1" button Multisite?

    Yep :)

  11. Andrea_r
    team pirate
    Posted 1 year ago #

    I'm seeing the Super-Admin menu in the admin pages, just not sure if suddenly I have the right software running.

    There's no longer two codebases - not since 3.0. ;)

  12. Andreas
    Member
    Posted 1 year ago #

    It is a plugin issue. NextGen Gallery has difficulties with the blogs.dir structure.

  13. TonyVitabile
    Member
    Posted 1 year ago #

    Andreas:

    So you're saying that if I disable NextGen Gallery, the problem will go away?

    I've pretty much given up on this problem. I republished the links to the videos. Instead of http://.../sermons/..., they use http://.../wp-content/blogs.dir/5/... It works, but it's ugly.

    Tony

  14. Andrea_r
    team pirate
    Posted 1 year ago #

    Yeah he is. If you look for that plugin name + multisite or wpmu, you'll see it consistently has issues.

  15. TonyVitabile
    Member
    Posted 1 year ago #

    I'll give that a shot tonight. Can't hurt.

    Thanks

    Tony

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags