Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14
Originally Posted by elija If you have the ability to use a .htaccess file with Go Daddy then this may work for you. Code: RewriteEngine on RewriteCond %{HTTP_HOST} ^aaa\.com$ RewriteRule ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778

    Quote Originally Posted by elija View Post
    If you have the ability to use a .htaccess file with Go Daddy then this may work for you.

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^aaa\.com$
    RewriteRule (.*) http://www.aaa.com/$1 [R=301,L]
    RewriteRule ^$ wp-aaa-folder [L]
    My site which is word press and hosted with Host Gator. which should answer your question
    Thanks for your advice.

    .htaccess
    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /WPReynold/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /WPReynold/index.php [L]
    </IfModule>
    ...
    ...
    WPReynold - WP folder
    reynoldstocks.com - URL

    Whether delete all content on this section and replace it with
    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^reynoldstocks\.com$
    RewriteRule (.*) http://www.reynoldstocks.com/$1 [R=301,L]
    RewriteRule ^$ WPReynold [L]
    Rgds
    satimis

  2. #12
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,488
    Try this block.

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /WPReynold/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /WPReynold/index.php [L]
    
    RewriteCond %{HTTP_HOST} ^reynoldstocks\.com$
    RewriteRule (.*) http://www.reynoldstocks.com/$1 [R=301,L]
    RewriteRule ^$ WPReynold [L]
    </IfModule>
    Back up your original .htaccess first as I haven't tested this and if it goes horribly wrong, you will want to back out quickly! As screwing up a .htaccess can bring a site down, it would be better to test this on a dev environment before going live with it.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  3. #13
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by elija View Post
    Try this block.

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /WPReynold/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /WPReynold/index.php [L]
    
    RewriteCond %{HTTP_HOST} ^reynoldstocks\.com$
    RewriteRule (.*) http://www.reynoldstocks.com/$1 [R=301,L]
    RewriteRule ^$ WPReynold [L]
    </IfModule>
    Back up your original .htaccess first as I haven't tested this and if it goes horribly wrong, you will want to back out quickly! As screwing up a .htaccess can bring a site down, it would be better to test this on a dev environment before going live with it.
    Already have .htaccess duplicated as .htaccess_copy

    Add following lines to the bottom of the section
    Code:
    RewriteCond %{HTTP_HOST} ^reynoldstocks\.com$
    RewriteRule (.*) http://www.reynoldstocks.com/$1 [R=301,L]
    RewriteRule ^$ WPReynold [L]
    Reload the webpage

    On browser ran;
    Code:
    http://www.reynoldstocks.com
    it popup "Future home of something quite cool" page

    Ran;
    Code:
    http://www.reynoldstocks.com/WPReynold
    It changed back to
    Code:
    http://www.reynoldstocks.com
    immediately.

    Deleted the tesing .htaccess file and changed the duplicated file back to .htaccess

    Reload the page. It doesn't work anymore.

    Running;
    Code:
    http://www.reynoldstocks.com/WPReynold
    change back;
    Code:
    http://www.reynoldstocks.com
    still displaying "Future home of something quite cool" page.

    This is a testing site. Nothing has been built yet. I can reinstall it.

    Edit:
    After reboot PC /reynoldstocks.com/WPReynold works again


    satimis
    Last edited by satimis; 05-08-2013 at 04:34 PM.

  4. #14
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Hi elija,

    Sorted out my problem as follows;

    To make multi-domains to work on WordPress(WP) perform steps as follow;
    (I'm not going to mention "Hosted Domains" setup here)

    1) Install WP on a directory/folder of the domain (not root/webroot)
    say, aaa.com (directory)

    2) Create a directory /aaa.com/wpaaa for WP and install WP on it

    3) After installation completed and effective, go to File Manager. Copy both .htaccess and index.php on /aaa.com directory

    4) On index.php

    change the line - require('./wp-blog-header.php');
    to - require('./wpaaa/wp-blog-header.php');

    reload the page. That is all, not necessary touching .htaccess

    On browser running AAA Home or /aaa.com displays WP front page. That's it.

    However to login WP it still requires full path, /aaa.com/wpaaa/wp-admin. I haven't found a solution yet.


    Anyway, lot of thanks for your assistance.

    B.R.
    satimis

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •