Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6156513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:37:22+00:00 2026-05-23T20:37:22+00:00

basically I’m trying to do this: subdomain.domain.com -> domain.com/account?user=subdomain So far so good. I

  • 0

basically I’m trying to do this:

subdomain.domain.com -> domain.com/account?user=subdomain

So far so good. I have found this code to do it and works perfect:

RewriteCond %{HTTP_HOST} !^domain\.com [NC]
RewriteCond %{ENV:REDIRECT_SUBDOMAIN} =""
RewriteCond %{HTTP_HOST} ([^.]+)\.domain\.com$
RewriteRule ^(.*)$ account.php?user=%1 [E=SUBDOMAIN:%1,L]
RewriteRule ^ - [E=SUBDOMAIN:%{ENV:REDIRECT_SUBDOMAIN},L]

Now I’m trying to add one more simple rule to it (marked with *). Adding this new rule makes everything fall apart. Nothing works anymore

RewriteCond %{HTTP_HOST} !^domain\.com [NC]
RewriteCond %{ENV:REDIRECT_SUBDOMAIN} =""
RewriteCond %{HTTP_HOST} ([^.]+)\.domain\.com$
* RewriteRule ^/somepage http://domain.com/anotherpage [E=SUBDOMAIN:%1,L]
RewriteRule ^(.*)$ account.php?user=%1 [E=SUBDOMAIN:%1,L]
RewriteRule ^ - [E=SUBDOMAIN:%{ENV:REDIRECT_SUBDOMAIN},L]

Any idea what is going on and how to correct it ?

Thank you
Catalin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:37:23+00:00Added an answer on May 23, 2026 at 8:37 pm

    A RewriteRule is subject to the current set of RewriteCond conditions.

    So you will have to do something like that:

    RewriteCond
    RewriteCond
    RewriteRule
    
    
    RewriteCond
    RewriteCond
    RewriteRule
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I have code where the user clicks a link, and then a div
Basically, I have a list of delivery checkboxes one for deliver to this address
Basically I have some simple code that does some things for files and I'm
Basically i'm trying to build a comment system. The user looks at a photo
Basically I have a loop incrementing i, and I want to do this: var
Basically, the reverse of abs. If I have: if ($this.find('.pdxslide-activeSlide').index() < slideNum - 1)
Basically I have some code to check a specific directory to see if an
Basically I'm trying to accomplish the same thing that mailto:bgates@microsoft.com does in Internet Explorer
Basically I have an invoice lines for a below account as below: BillID AccountID
Basically I'm wondering if I can compile code that a user inputs in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.