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 431523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:59:00+00:00 2026-05-12T19:59:00+00:00

I have a requirement that I want to check the request headers and according

  • 0

I have a requirement that I want to check the request headers and according to that I want to forward the incoming request to appropriate sub domain of my company.

For example:

request header A is coming then it goes to a.domain.com always (no matter request comes to a.domain.com or b.domain.com)

Similarly request header B is coming then it goes to b.domain.com always.

Although I can do this by changing my application (checking the request headers in it) and then forwarding the request but I want that instead of request reaching application server, it should be handled by web server at the first.

Is there something available (some way like CGI) which can handle IIS as well as Apache both as my company has sub domains hosting applications on these two.

Any help is greatly appreciated. Thanks

  • 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-12T19:59:00+00:00Added an answer on May 12, 2026 at 7:59 pm

    In Apache you can use mod_rewrite to direct the request to another domain, something like the following perhaps:

    rewriteEngine on
    rewriteBase /
    rewriteCond %{HTTP_HOST} ^A$
    rewriteRule ^(.*) http://a.domain.com/$1 [L,R=301]
    

    This needs to be scoped appropriately by putting it in a .htaccess file in the appropriate directory or in a site configuration element.

    IIS (depending on the version) also supports a rewrite module. For IIS 6 you can look at IIRF which has a syntax similar to mod_rewrite. For IIS 7 take a look at the URL Rewrite Module which has a simple GUI that imports mod_rewrite rules.

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

Sidebar

Related Questions

I have a requirement that i want to get all the system services running
My requirement is that I want an object (tee) to update if there have
I want to parse the strings, so that to check whether they have specified
I have a requirement that before the page is going to load i want
I want to have a check in place so that any print commands donot
I have one requirement that I want to create a pool of 5 threads
the requirement is I want to a program in c# which only check that
I have developed a MVC3 application in that I want use the Check boxlist
In our project we have requirement that, after receiving sms message from third party
I have the requirement that I need to open a document in Microsoft word

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.