WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] .htaccess file (7 posts)

  1. drgene113
    Member
    Posted 3 years ago #

    I have set up WordPress Multisite on my site by editign teh wp-config.php file and addign this code as instructed;

    define('WP_ALLOW_MULTISITE', true);

    Then I added the code provided in the instruction but deleted the above code. Is that supposed to be left in as well, when addign the new code? (I deleted it before adding the new code)

    The SuperAdmin now appears at the top of my dashboard.)

    Re: .htacess file
    The instructions are telling me to edit the .htacces file by adding this code:

    RewriteEngine On
    RewriteBase /
    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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Do I have to manually create an .htacess file and place it in the root directory?

    I tried creating a file called htacess.txt, then uploaded it, then changed the name to .htacess but then my site became non-functional.

    I'm not sure if it matters but I also changed the permalinks to a custom setting of: /blog/%postname%/

    Any help would be appreciated.

  2. The .htaccess file is hidden if there's one there already. If there isn't then, yes, you need to create one with that in it.

    If it makes your site inoperable, please contact your webhost and ask them.

  3. drgene113
    Member
    Posted 3 years ago #

    Thanks.
    Doess the code define('WP_ALLOW_MULTISITE', true); need to be included in the wp-config.php file? Or was it ok to delete it before I added the new 20 lines of code as instructed in the. Tools-->network setup

  4. I usually leave it. It doesn't have to be there, but it DOES show you the network menu item in case you have to refer to it again. ;)

  5. drgene113
    Member
    Posted 3 years ago #

    Ok thats done.
    Then I copied and pasted the code generated thatnisntombe entered into and htaccess file.

    I created a file called htaccess.rtf with the code inside it.
    I uploaded it to the root directory and then renamed it to .htaccess

    when I do that my site crashes and give an internal service error

    Gene

  6. I created a file called htaccess.rtf with the code inside it.

    Because you made an rtf file, not a plain text file.

    Do you have cpanel on the server? some sort of control panel that will make a blank text file for you?

  7. drgene113
    Member
    Posted 3 years ago #

    Thanks so much; that did the trick.

    Much appreciated.
    Gene

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.