• I have been trying for several weeks now to setup multisite on my wordpress installation without success. I have added the provided code to my wp-config.php and .htaccess files. With help from my host I’ve setup the wildcard sub-domain. I have created a sub-domain via my Cpanel.

    My host has now advise that my .htaccess file is preventing access to any new sites created using the multisite feature.

    Apparently it is not generating the WordPress admin URL’s properly.

    I’m simply added the code given to me during the multisite instalation shown below. Is there any reason why it might be preventing me accessing new sites or not generating URL’s properly.

    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]

    Thank in advance.

    Adrian

Viewing 15 replies - 1 through 15 (of 15 total)
  • I dont see anything wrong with that. Can you either provide urls or tell us what the problem is with the urls?

    Thread Starter Moardesign

    (@moardesign)

    I have access to my network admin, my main site’s Dashboard and the site itself but when I create a new sub-domain I can’t access the dashboard or the new site.

    When I try I get –

    The requested URL /wp-admin/ was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    When I queried this with my host they explained that my .htaccess was preventing access to my new sites as it generating URL’s properly. They were unable to resolve the problem and suggested I contact WordPress Developers who may know.

    Adrian

    I think there might be a configuration problem in cpanel WRT the wildcard/subdomain. The subdomains should be using the same Document Root as the main site. One way to test this out is to create an html file and access it from the main and subsite urls. For example create a file called hello.html (put some content in there) and put it in your document root. Verify you can access it from your main site – domain.com/hello.html If that works try accessing it from a sub site – site1.domain.com/hello.html My guess is that subsite url will not work.

    Thread Starter Moardesign

    (@moardesign)

    jkhongusc,

    You were right, I can access it from the main site but can’t access it from the sub site!

    So if this indicate a problem in cpanel WRT is this something my host can resolve or is there a fix I could do?

    Adrian

    Adrian –
    I dont never used cpanel. Go back to your cpanel settings for your wildcard subdomain. Make sure that the Document Root is the same as your main site – you should be able to see your main site Document Root in cpanel.

    Use that test html page to verify that the Document Root matches. Once you have that you should be able to continue setting up your WP multiste.

    Thread Starter Moardesign

    (@moardesign)

    jkhongusc,

    I can now access the hello.html file via the sub site. A security alert came up stating it was unsafe, however when I bypassed this I could get to the file via the sub site.

    Unfortunately I still cant access any of my sub sites or their dashboard.

    The site is called scottishluxurygifts.com. When I try accessing testing.scottishluxurygifts.com outwith my wordpress admin pages it states the webpage is not available.

    https://www.testing.scottishluxurygifts.com/hello.html exists so Im assuming its not that files associated with testing.scottishluxurygifts.com cant be created they’re just not accessable or created via the wordpress admin options.

    Would you recommend going with a different host? They assure me that its not a problem from their end and that my .htaccess file isn’t generating the WordPress admin URL’s properly.

    Adrian

    Thread Starter Moardesign

    (@moardesign)

    jkhongusc,

    Correction to above its – https://www.testing.scottishluxurygifts.com/hello.html

    Adrian

    Adrian –
    Something in cpanel is not setup right still. You have https configured proper, just ignore the certificate warning for now.

    This works –
    https://www.testing.scottishluxurygifts.com/hello.html

    This does not work –
    https://www.testing.scottishluxurygifts.com/hello.html

    This tells me that the Document Root for your subdomain is still right. You got it for https, so there must be a section for http.

    Thread Starter Moardesign

    (@moardesign)

    Jkhongusc,

    Do you think this could be causing me to not be able to access sub domains?

    Adrian

    Thread Starter Moardesign

    (@moardesign)

    The issue appears to have been the fact that I had an SSL cert on my main site. My host has recommended that I create a new hosting account for my multsites and keep my main site on the orginal hosting account with the SSL cert.

    I can limit the SSL exclusively to cart/checkout pages then the sub-domains are accessable, but had hoped to use the SSL cert on my home page.

    It seems odd that the sub-domains couldnt be accessable just because the main site was https.

    Do you think there is a better solution?

    Adrian

    You can download a plugin htaccess to wp.

    Thread Starter Moardesign

    (@moardesign)

    PrenticeBotosh,

    I can access the .htaccess file for editing through my cpanel. Would this help in some way towards the permalinks?

    Adrian

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Are you trying to have SOME sites be https and some not? It’s a little tricky but you can do that with Multisite.

    Thread Starter Moardesign

    (@moardesign)

    Initially it was just a case of sorting out the access issue, but all sites on the network are ecommerce sites and so having the SSL cert on at least the checkout and cart pages for all sites would be helpful.

    At present I only have one SSL cert for the main site.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I have SSL on all my admin, and on the front end of one site: https://halfelf.org/2014/ssl-for-one-domain-on-multisite/

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Whats wrong with my .htaccess file?’ is closed to new replies.