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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:32:00+00:00 2026-06-08T11:32:00+00:00

I wish to have request for http://user1.domain.com : return the output from http://www.domain.com/site-client/site.php?site=user1 AND

  • 0

I wish to have request for http://user1.domain.com :

  • return the output from http://www.domain.com/site-client/site.php?site=user1
  • AND user still see the URL ‘http://user1.domain.com’ in the browser

Right now I have the following .htaccess:

RewriteEngine On
RewriteBase /

# Protect the htaccess file
<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>

# Disable directory browsing
Options All -Indexes

RewriteCond %{HTTP_HOST} !^www.domain.com
RewriteCond %{HTTP_HOST} !^admin.domain.com
RewriteCond %{HTTP_HOST} ([^.]+).domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/site-client/site.php?site=%1 [L]

The successfully calls the http://www.domain.com/site-client/site.php?site=user1 URL, but it shows it to the user.
How can I avoid this?

  • 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-06-08T11:32:01+00:00Added an answer on June 8, 2026 at 11:32 am

    You need to get rid of the http://www.domain.com part of yor RewriteRule‘s target. It tells mod_rewrite that you want a 302 redirect. So your rule should look like this:

    RewriteCond %{HTTP_HOST} !^www.domain.com
    RewriteCond %{HTTP_HOST} !^admin.domain.com
    RewriteCond %{HTTP_HOST} ([^.]+).domain.com [NC]
    RewriteCond %{REQUEST_URI} !^/site-client/site.php
    RewriteRule ^(.*)$ /site-client/site.php?site=%1 [L]
    

    EDIT: You’ll also need a check to keep the rule from looping

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

Sidebar

Related Questions

I wish to have a slider similar to they use. http://www.koovs.com/apple-ipod Can anyone suggest
We have a website that we wish to have a www. version of only,
Actually I wish I knew where to start from... I have embedded an third
I have an SSL certificate for the 'www' subdomain of a web site we'll
I have url rewrite rules which redirect www.domain2.com to a subfolder under the root
I'm actually trying to parse a JSON request response from my PHP web service
I wish to have a page that has a fixed height (without scroll bars).
I wish to have a java-chat on the iphone / ipad. With both, as
I wish to have an If statement in my code, which tests if any
Does python have immutable lists? Suppose I wish to have the functionality of an

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.