Skip to main content

RewriteEngine redirects to subdomain instead of Rewriting

Comments

2 comments

  • MilesWeb

    I understand that you're facing issues with the alias menu disappearing after switching to the Jupiter theme. Additionally, you want to configure an alias to display a subdomain without redirection. Here's a revised explanation:

    To resolve this, you may need to modify the .htaccess file to achieve the desired behavior without redirection. This modification should display the content of xyz.mydomain.abc when accessing mydomain.abc without triggering a redirection.

     
    Here's an adjusted version:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mydomain\.abc$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.mydomain\.abc$
    RewriteRule ^$ /apps/xyz/index.html [L]
    1
  • milktea

    MilesWeb thank you for your reply.

    I went back to this question because I've figured it out myself and I was going to edit that I've fixed the issue. To my surprise, we have the same answer, more or less. My working solution is:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mydomain\.abc$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.mydomain\.abc$
    RewriteRule ^(.*)$ /apps/xyz/$1 [L]

    Thank you for taking time to respond. Cheers!

    1

Please sign in to leave a comment.