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

  • Home
  • SEARCH
  • 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 3975216
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:39:32+00:00 2026-05-20T04:39:32+00:00

I am close to achieving my goal but I cannot come up with the

  • 0

I am close to achieving my goal but I cannot come up with the correct solution to my problem.

I have written the following rules for my wildcard subdomains:

#remove www.
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain\.com/$1 [R=301,L]

#rewrite subdomains to /club/<clubname as defined by subdomain>/<whatever was here before>
RewriteCond %{HTTP_HOST} ^(.+)\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/club/%1/$0 [NC,L]

This is desperately close to what I require, ie if I go to http://alpha.domain.com/some/string/here the URL is rewritten to http://domain.com/club/alpha/some/string/here

however

I would like the url in browser to still look like the original url

Many thanks in advance

EDIT: I have tried just adding PT to the final rule but that doesn’t work, I get a 400 error

EDIT2: For anyone interested, I abandoned this line of enquiry and instead used php to read the text in the subdomain.

  • 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-20T04:39:32+00:00Added an answer on May 20, 2026 at 4:39 am

    If the http://www.example.com subdomain uses the same virtual host as the example.com domain, you can just use an internal rewrite by using a relative path:

    RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC]
    RewriteCond $0 !^club/
    RewriteRule ^(.*)$ club/%1/$0 [NC,L]
    

    Otherwise you will need a proxy:

    RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/club/%1/$0 [NC,L,P]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I close form with form.Dispose() but i have problem that all opened MessageBoxes does
I have an xts object that has intraday data: head(stocks[,1]) SMH.close 2009-01-02 09:31:00 17.66
I have been searching the web for this, but have been unable to find
I'm so so close to acheiving what I want... but I'm wondering if I've
I have looked at many of these galleries and displays, but none of them
We have a Windows application written in C++, part of which we are trying
The close button on the RadWindow works fine!!! But I'd like to add a
self.close() is working fine in IE but not in Mozilla. Does anyone know what
Is there any focused documentation on achieving the following with TFS. I find myself
I have the following code layout: #ifndef _file_h_ #define _file_h_ namespace FooBar { //

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.