WordPress.org

Ready to get started?Download WordPress

Forums

Multisite on 1and1 (403 forbidden errors on wp-content theme images) (10 posts)

  1. WPsites
    Member
    Posted 1 year ago #

    I've got a client that uses 1and1 for hosting all their domains. I have created them a multisite network and tried to install that on 1and1. I've manually created the subdomains in 1and1 and pointed that to the same filesystem location.

    When I try look at the new sub domain the site comes up but none of the files inside the /wp-content/themes/theme-name/ folder show up. Each one just gives a 403 forbidden error.

    I've had this exact same setup working on my development server but it just doesn't work over on 1and1. I've checked the permissions of those images and they are readable for pretty much everyone, I even tried relaxing permissions to 777 but still no joy.

    Any ideas anyone?

    Anyone else running a sub domain install of WordPress multisite on 1and1 hosting?

  2. The site comes up but can't see the main domain...

    What's in your .htaccess?

  3. WPsites
    Member
    Posted 1 year ago #

    The .htaccess is standard multisite.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    I can access the main site and I can access the new subdomain based site I created. Problem is that none of the theme styles or images show up on the subdomains. They all generate a 403 error. The index page shows up fine, just those assets missing.

    This exact setup works on another hosting setup with no such problems.

  4. Okay...

    Try putting this at the very top of your .htaccess

    AddHandler x-mapp-php5 .php

    You may also need to try this:

    Options -MultiViews
  5. WPsites
    Member
    Posted 1 year ago #

    No, hasn't had any effect.

    There is a .htaccess file further up the filesystem with the php5 handler.

  6. 403 is permissions on the server, but that's just weird... did you ask 1and1?

  7. WPsites
    Member
    Posted 1 year ago #

    That's my next step!

  8. Ben
    Member
    Posted 1 year ago #

    I've manually created the subdomains in 1and1 and pointed that to the same filesystem location.

    Where did you create the sub-domains, in WordPress or both WordPress & your web hosting manager (example cPanel)? Because if you created them in your web hosting manager they would overwrite WordPress files. The sub-domain just needs to be *.YOURSITE.COM as a wildcard in your web hosting manager and then it should link up to WordPress using the .htaccess file which is installed in the main directory of where WordPress is located.

    Your .htaccess file should look like this:

    # BEGIN WordPress
    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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    I hope this helped you.

  9. WPsites
    Member
    Posted 1 year ago #

    I don't think you can create wildcard subdomains on 1and1 hosting.

    The problem is fixed now. In the 1and1 control panel there is an option in the upload tools section to set certain directories to be world executable, that fixed the problem.

    Thanks

  10. Ben - That's the .htaccess for subfolders :) Subdomains is the one WPsites had above.

Topic Closed

This topic has been closed to new replies.

About this Topic