• Hi,
    I am trying to install my wp-blog in a sub-directory of my webspace using a separate domain name.(Directory:www.new-strategy.com/chance, separate domain: https://www.chance-statt-krise.de).

    When calling the separate domain (www.chance-statt-krise.de) the browser keeps jumping to my principal domain: https://www.new-strategy.com showing the index.htm out of the root-directory.
    How can I make the blog appear under its separate domain-name out of the sub-directory?

    Please help!
    Thank you very much,
    Christian

Viewing 1 replies (of 1 total)
  • You can addon your new domain associated with a folder in your public_html (root).

    If you want to associate your folder become your main domain, you can try to edit your .htaccess file

    Edit and replace your .htaccess file in your root directory with this

    # Do not change this line.
    
    RewriteEngine on
    
    # Change yourdomain.com to be your main domain.
    
    RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$
    
    # Change 'subfolder' to be the folder you will use for your main domain.
    
    RewriteCond %{REQUEST_URI} !^/subfolder/
    
    # Don't change this line.
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # Change 'subfolder' to be the folder you will use for your main domain.
    
    RewriteRule ^(.*)$ /subfolder/$1
    
    # Change yourdomain.com to be your main domain again.
    # Change 'subfolder' to be the folder 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.)?yourmaindomain.com$
    RewriteRule ^(/)?$ subfolder/index.php [L]

    Having a look at your domains, you may have already resolved the problems

Viewing 1 replies (of 1 total)
  • The topic ‘wp in sub-directory under separate domain-name’ is closed to new replies.