Skip to:
Content
Pages
Categories
Search
Top
Bottom

htaccess.dist and / or .htaccess? I like to over complicate things sry

  • @bigkill

    Participant

    I could not get my BP install to work without adding a .htaccess file that looks like your standard WP installation .htaccess file

    example:

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    </IfModule>

    So what do I do with htaccess.dist ? just leave it allow right?

    Does the above .htacccess look right for BP

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • @trent

    Participant

    Those are just the standard entries required for WP, not specific to BP at all. Just need the .htaccess file, nothing has to be done with htaccess.dist at all :)

    @johnjamesjacoby

    Keymaster

    You should use the .htaccess.dist file that comes with BuddyPress if BuddyPress does not create or cannot edit the existing one that’s there.

    What you have above will not be enough for all of BuddyPress/WPMU to function correctly.

    RewriteEngine On
    RewriteBase BASE/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.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>

    It has additional lines for handling multiple upload directories, blogs, etc…

    @bigkill

    Participant

    johnjamesjacoby – so what should my directory look like where wordpress lives?

    /.htaccess

    /htaccess.dist

    or that the content of htaccess.dist and place into .htaccess?

    I have been fighting this and my php.ini.. so if I knew the correct way I need to start there.

    TIA

    @johnjamesjacoby

    Keymaster

    Well, provided you don’t need any custom stuff in your .htaccess file…

    1. Delete existing .htaccess

    2. Rename .htaccess.dist to .htaccess

    3. Test

    @bigkill

    Participant

    okay.. for future BP installers if you get 500 error after mu install and your host doesn’t like your .htaccess file

    the default htaccess.dist looks like this

    RewriteEngine On
    RewriteBase BASE/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.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>

    But…

    notice line #2

    RewriteBase BASE/

    this should read

    RewriteBase /

    so if you get 500 error.. this could be the culprit – works for me

    source – https://mu.wordpress.org/forums/topic.php?id=11076

    @johnjamesjacoby

    Keymaster

    Good job :)

    @bigkill

    Participant

    johnjamesjacoby – only with your help! thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘htaccess.dist and / or .htaccess? I like to over complicate things sry’ is closed to new replies.
Skip to toolbar