Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello
    Please check this code

     # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    # custom rules for subdomain matching
    RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com$ [NC]
    RewriteRule . https://example.com/%1 [R=301,L]
    
    # default WordPress rules
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    

    Replace example.com with your domain name. You will need to add this in your htaccess file on root. You don’t need to create a sub domain as well. for more details see this
    https://wordpress.stackexchange.com/questions/258006/how-to-add-a-custom-redirect-rule-for-sub domains

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Moved to Fixing WordPress, this is not a Developing with WordPress topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Showing WooCommerce Product Category On Different subdomains’ is closed to new replies.