Support » Networking WordPress » htaccess / wpconfig for numerous wordpress and woocommerce sites?

  • I want to run several wordpress and woocommerce sites with one hosting package (hostinger premium package),
    each website will be installed in a seperate subfolders.

    For example:
    My website ‘first.com’ will be installed in a subfolder named ‘/first’
    My website ‘second.com’ will be installed in a subfolder named ‘/second’
    etcetera

    As these sites are all different (using different themes/childthemes/plugins)I won’t use multisite.

    Currently I have this in my .htaccess file:

    
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} ^first\.com$ [NC]
    RewriteRule ^(.*)$ http://www.first.com/$1 [R=301,L] 
    
    RewriteCond %{HTTP_HOST} ^(www.)?first.com$
    # voor https: 
    # RewriteCond %{HTTPS} !on
    # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    RewriteRule ^(/)?$ first [L]
    

    This does redirect visitors of ‘first.com’ to the wordpress site in subfolder ‘first’
    However I want the url to be ‘first.com’ when they type in ‘first.com’ in their browser, but they end up in: ‘first.com/first’

    What am I doing wrong? How should my .htaccess look like for multiple sites and https sites? Do I need to alter my wp-config as well ? How about the permalinks ?

    I’ve searched for hours on how to setup .htaccess files for numerous wordpress/woocommerce sites.. but I can’t figure this out on my own 🙁

Viewing 1 replies (of 1 total)
  • For example:
    My website ‘first.com’ will be installed in a subfolder named ‘/first’
    My website ‘second.com’ will be installed in a subfolder named ‘/second’
    etcetera ..As these sites are all different (using different themes/childthemes/plugins)I won’t use multisite…

    …This does redirect visitors of ‘first.com’ to the wordpress site in subfolder ‘first’
    However I want the url to be ‘first.com’ when they type in ‘first.com’ in their browser, but they end up in: ‘first.com/first

    My knee-jerk reaction is you really aren’t doing anything wrong, however you may need to either purchase additional domain names and point them to the individual site directories, or setup sub-domains. Otherwise you might just be pointing to site addresses containing individual site sub-directories in each URLs.

    Sub-domains would allow you to separate your sites and probably look something like this:

    (site one in the root directory) yourdomain.com
    (site two in a sub-directory) second_site_name.yourdomain.com
    (site three in a sub-directory) third_site_name.yourdomain.com – etc.

    I don’t think .htaccess will solve the problem – although there are some pretty creative solutions out there, so who knows – but in this case I don’t think it’s possible using .htaccess.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.