Where do you replace files in htc access file to create multisite?

Hi,

I created a multisite and have gotten through the steps where I added the code above the "happy blogging" line. Now, it says to
Add the following to your .htaccess file in /home3/marhud54/public_html/, replacing other WordPress rules:

Do you know if I am supposed to delete all of the wordpress rules and copy and paste this into there or if there is a spot I'm supposed to start at? What is considered a rule in the htc access file? Is there a particular line I should paste this above?

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]

  • marhud54

    I attempted to copy it. Then I tried deleting the access file rules and replacing with the multisite but was given a database error at log in. I then tried to add those files back and got the same error at log in. Do I have to start all of this process again? I have rebuilt it like 10 times. I wish I could figure out from the tutorial what it means when it says to replace the rules as there are a couple of different sets of rules on that page...so frustrating....anybody know where to put it???

  • marhud54

    This is what I have now - thanks!!! I tried pasting it as before, but messed something up I guess...

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    #If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
    </IfModule>

    # END WPSuperCache

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  • marhud54

    Is it? Before I attempted to activate the network, I disabled all the plugins. When I re-launched WP, I also deleted everything out of the WP files. Do you know where it is all coming from? Is there a way to get rid of it? Here's a step by step of all I have done to this point:

    - Deleted all WP files from public file
    - Created a *subdomain through my hosting site
    - Added multisite code to config.php
    - Network activated
    - Added code given at activation to my config.php
    - Attempted to replace code on htcaccess file but was given error message

    Did I miss something when I re-uploaded WP? Thanks again for all of your help! Everyone here has been great!

  • marhud54

    I'm using Host Gator. Do you know how I would just start fresh? I have gone to my Public html and have deleted all files again and then reuploaded again and my access looks like this. Is it because I created the *subdomain?

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    #If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:stuck_out_tongue:rofile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
    </IfModule>

    # END WPSuperCache

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  • PC

    Hey @marhud54

    If you have tried to start fresh and it still did not work, its clear that we are doing something wrong.

    I would love to have a closer look if you want !

    Can you please send me your login details via our secure contact form

    1: Mark the email to my attention

    Attn: PC

    2: Include a link of this thread in the email

    3: Include FTP and WordPress super admin and cpanel details.

    4: While filling the form, select "I have a different question" from the list.

    Looking forward for a response on this.

    Cheers
    PC

    PS : @Dev4 thanks for being on top of this :slight_smile: you certainly deserve a few points :wink: did you already got them ? lol

    Cheers
    PC
    Sales &Support

  • ericwied1

    Hey just a point of reference I have bluehost and i just upgraded a single site install to multisite and this is my htaccess file.

    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    # END WordPress

    hope that gives you some reference on what its "supposed" to look like to get it to work.

    Also on a note after looking at your .htacess file (this is way over my head in knowledge base) it looks like its rewriting the root directory to the supercache file directory so it may not be even accessing the wp-config that you edited. I would suggest trying to edit the supercache folder .htaccess and wp-config file and see what you get as that may be the problem

    @PC can you check this observation and give your feedback.

  • ericwied1

    Just got some new info on this issue it seems that the plugin wp super cache is or was installed on your installation, that is what all those rewrite rules are.

    http://wordpress.org/plugins/wp-super-cache/

    @Dev4 heres a link to the hostgator forum on it http://support.hostgator.com/articles/specialized-help/technical/wordpress/wp-super-cache-plugin

    @marhud54 try removing the wordpress install using hostgator and check the different cache files for it as well.

    Then try installing a fresh wordpress instal using a ftp client like FileZilla. Try downloading the wordpress files to be uploaded from here. http://wordpress.org/download/ Or try getting the 3.5.2 version here: http://wordpress.org/download/release-archive/

    Note: Do not install any plugins.

    That may have been your original issue or having the plugin previously installed then removing it.

    Once that is done see if your multi site works. If it does then install the plugins and "import" all the wordpress content you had before using the wordpress importer or another wordpress importer.

    I believe this is the only way to be sure of a clean instal and will help deduce the problem.

  • marhud54

    Thanks so much for your help! I followed your suggestions and for the first time, my site didn't show "database error" when I entered the code on the htaccess file. My site appears to still be running, but now I have a new problem...I can't log in....did I get rid of some sort of log in information when I got rid of the super cache? Any tips? If I could just get in to my site, it appears everything is running well : )

  • marhud54

    Hi PC, I sent an email with my log in details and I think it was sent to you...I put it attention PC...somebody wrote me back they would look at it later. Was that you?

    I was able to go through all the steps on installing my wordpress without getting the database failure, however, it appears the network didn't install. I changed the config and access files, but I still see the option of network set up even after I logged back in

  • ericwied1

    @marhud54 Glad i was able to get things working for you temporarily

    If you login is not working for wordpress have you tried to simply reset your password?

    If that doesn't work you can simply go into your database using php my admin and check the admin email and then try resetting your password. Or while in the phpmyadmin you can just create a new admin record too under the user tables.

    Hope this helps if you want you can send me a private email to ericwied [@] Me.com and i will fix it for you. just a point though i need your hostgator login info and your wordpress login info to fix it. Also if you have a ftp login that would help too.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.