• PaulDoesWP

    (@pauldoeswordpress)


    Hello.
    I have a WordPress site: http://iambiscuit.com/ which is hosted at http://paulroper.com/iambiscuit/

    My WordPress install is in a subfolder ( /iambiscuit ) in the public_html folder of paulroper.com.

    I have set up masked domain forwarding (with Godaddy.com) so iambiscuit.com forwards to http://paulroper.com/iambiscuit/. I have been having all sorts of problems with WordPress just refusing to get to grips with this. In Settings > General, I have: the WordPress Address (URL) and Site Address (URL) set to http://paulroper.com/iambiscuit. My problem is that any generated links are in the format http://paulroper.com/iambiscuit, and not just iambiscuit.com. For example, today I added the official Twitter plugin, so someone can tweet one of my posts. But when they click on the tweet button, the generated link is in the paulroper.com/iambiscuit…. format, not just iambiscuit.com (I have since disabled that plugin).

    I have tried tweaking the Settings > General WordPress Address and Site Address to make either or both of them just http://iambiscuit.com, but as soon as I change either one from the full http://paulroper.com/iambiscuit/, the site dies completely, and the only way I can resurrect it is to add

    define('WP_HOME','http://paulroper.com/iambiscuit');
    define('WP_SITEURL','http://paulroper.com/iambiscuit');

    to my wp-config.php. From then on, it is impossible for me to ever edit the Settings > General > WordPress Address (URL) and Site Address (URL) in the Dashboard, even if I delete those WP_HOME... lines from wp-config.php. (If I delete those two lines from wp-config.php, the site is completely inaccessible and dead).

    I also found these in wp-config.php:

    define('SUBDOMAIN_INSTALL', false);
    $base = '/iambiscuit/';
    define('DOMAIN_CURRENT_SITE', 'paulroper.com');
    define('PATH_CURRENT_SITE', '/iambiscuit/');

    …and wondered why SUBDOMAIN_INSTALL is false. I also wondered if tweaking any of those other values might help, but haven’t tried yet, because I am kinda tired of my site falling over at the slightest change!

    So, what I’m looking to do is remove any reference to paulroper.com, and make all my links start with iambiscuit.com. If I look at my permalinks settings, all the options start with http://paulroper.com/iambiscuit/...

    Any suggestions would be greatly appreciated!

    – Paul

Viewing 5 replies - 1 through 5 (of 5 total)
  • First, I have my sites at BlueHost and I do not know anything about how GoDaddy deals with Add-On Domains. At BlueHost, I simply cPanel-assign a given domain to its installation folder and that is the end of that. So, I have this:
    primary.com assigned to /public_html/
    add-on1.com assigned to /public_html/addon1/
    add-on2.com assigned to /public_html/addon2/
    add-on3.com assigned to /public_html/addon3/
    add-on4.com assigned to /public_html/addon4/
    add-on5.com assigned to /public_html/addon5/

    ‘iambiscuit.com’ is a registered domain that never needs to know it is an Add-On. So unless your account at GoDaddy does not allow for more than one domain, you can do away with any tricky stuff by simply pointing ‘iambiscuit.com’ to the GoDaddy nameservers and then just cPanel-assign ‘iambiscuit.com’ to its own folder and never have anything other than ‘http://iambiscuit.com’ at Settings > General and/or anywhere in your database.

    Thread Starter PaulDoesWP

    (@pauldoeswordpress)

    Thanks for your reply, leejosepho.

    So unless your account at GoDaddy does not allow for more than one domain

    And therein lies the problem. After all the frustration I’ve been through, I eventually discovered that indeed, GoDaddy does not allow for more than one domain forwarded to a subfolder, with their “economy” hosting which I had. I have, this morning, just upgraded it to their “Deluxe” hosting, which ,apparently, allows for multiple websites on the same server, with no domain forwarding – it should behave exactly as if I have dedicated hosting for each domain (even though it’s physically hosted on the same shared server, sharing server resources).

    So – now comes the excitement of moving my WordPress site to the “new server”!

    So – now comes the excitement of moving my WordPress site to the “new server”!

    As long as you do not change any folder names or orders, that should be nothing more than copy-and-paste and then assign the domain to the location. The one exception there might be a plugin using “absolute server path” and will need to be uninstalled and re-installed in order for it to determine the new one.

    Thread Starter PaulDoesWP

    (@pauldoeswordpress)

    Luckily my website was very new, with nothing much on it.

    Because I’d been changing the domain names in the dashboard, in wp-config, functions.php and even tried a search-and-replace in and exported SQL database, I thought it best to just start again from scratch.

    It took another call to Godaddy to figure out how to get iambiscuit.com to point to some other space on the server. “Add-on Domains” was the answer. But now it’s up and running!

    Thanks for your help and suggestions!

    If you might ever want to move your Primary Domain to a sub-folder to help keep things neat-and-orderly in public_html, just make the new sub-folder and move the primary installation to it and then use this htaccess in public_html to redirect your primary to its own sub-folder without having to edit anything at all in the database:

    ## from https://my.bluehost.com/cgi/help/347#redirect
    # .htaccess main domain to subdirectory redirect
    # Do not change this line.
    RewriteEngine on
    # Change example.com to be your main domain.
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    # Change 'subdirectory' to be the directory you will use for your main domain.
    RewriteCond %{REQUEST_URI} !^/subdirectory/
    # Don't change the following two lines.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Change 'subdirectory' to be the directory you will use for your main domain.
    RewriteRule ^(.*)$ /subdirectory/$1
    # Change example.com to be your main domain again.
    # Change 'subdirectory' to be the directory you will use for your main domain
    # followed by / then the main file for your site, index.php, index.html, etc.
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    #RewriteRule ^(/)?$ subdirectory/index.html [L]
    ## index.php for WordPress
    RewriteRule ^(/)?$ subdirectory/index.php [L]

    Doing that would leave you with this…
    primary.com assigned to /public_html/.htaccess
    primary.com actually located in /public_html/primary/
    add-on1.com assigned to /public_html/addon1/
    …and you will not have to add the sub-folder to the domain URL to get there.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Subfolder installation AND masked domain forwarding’ is closed to new replies.