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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:47:43+00:00 2026-06-18T19:47:43+00:00

Simplified Question I changed domain.com/folder/client.php?id=1 to 1.domain.com with this .htaccess code Options +FollowSymLinks RewriteEngine

  • 0

Simplified Question

I changed domain.com/folder/client.php?id=1 to 1.domain.com with this .htaccess code

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).domain.com$ [NC]
RewriteRule ^$ /client.php?id=%2 [QSA,NC]

Now I want to change domain.com/folder/about.php?id=1 to 1.domain.com/about.

Is it possible ? or is there any other ways to do this?

Thank you 😀


Old Question

In my directory, I have 2 pages (client.php, about.php). I’ve already set a wildcard subdomain to the page directory and changed domain.com/folder/client.php?id=1 to 1.domain.com. This is my .htaccess code :

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).domain.com$ [NC]
RewriteRule ^$ /client.php?id=%2 [QSA,NC]

Now, I need to add another page. So, in client.php page, there’s a button to go to about.php page in the same directory. I tried 1.domain.com/about.php and it’s not working.

Do I have to create another line of RewriteCond ? or is there any other ways to do this?

Thank you very much 😀


Updated Code without working id

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTP_HOST} !^www.domain.com$             [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).domain.com$   [NC]
RewriteCond %{REQUEST_URI} !^/about                    [NC]
RewriteRule ^$ /client.php?id=%2                   [QSA,NC]

RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com$                [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?([^.]+)\.domain\.com$ [NC]
RewriteCond %{REQUEST_URI} ^/about                        [NC]
RewriteCond %{REQUEST_URI} !about\.php                    [NC]
RewriteRule . /about.php?id=%1                            [L,QSA]

**The code resolved the text in url box. Let’s say id=1. Now it’s showing 1.domain.com/about.

the php code : `$_GET["id"]` is not specified.**

Thanks to faa for the edit 😀


The Full Solution

Refer Using mod-Rewrite with 5 pages (wildcard sub-domain)

  • 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-18T19:47:44+00:00Added an answer on June 18, 2026 at 7:47 pm

    You may try this:

    Options +FollowSymLinks
    RewriteEngine on
    
    ## This is the actual rule-set that works as it is according to the OP
    RewriteCond %{HTTP_HOST} !^www.domain.com$             [NC]
    RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).domain.com$   [NC]
    # Added to exclude folder `/about`
    RewriteCond %{REQUEST_URI} !^/about                    [NC]
    RewriteRule ^$ /client.php?id=%2                       [L,QSA,NC]
    
    ## This is the additional rule set
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www.domain.com$             [NC]
    RewriteCond %{HTTP_HOST} ^(?:www\.)?([^.]+)\.domain\.com$ [NC]
    RewriteCond %{REQUEST_URI} ^/about                     [NC]
    RewriteCond %{REQUEST_URI} !about\.php                 [NC]
    RewriteRule . http://domain.com/folder/about.php?id=%1 [L,QSA]
    

    Maps silently

    http://N.domain.com/about with or without trailing slash

    To:

    http://domain.com/folder/about.php?id=N

    For permanent and visible redirection, replace [L,QSA] with [L,R=301,QSA]

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

Sidebar

Related Questions

This question is partly about delegates, and partly about generics. Given the simplified code:
This is a simplified example to illustrate the question: class A {}; class B
This is a simplified version of my question earlier today since I didn't get
This is heavily simplified for the sake of the question. Say I have a
I asked a question about this previously but my database structure has changed, and
I have simplified this considerably, however I have a question as to this best
This is a simplified example that should be enough for the question. @interface MyClass:
I have this in my Node script (simplified for this question): var http =
This is the simplified version of my question. There are movieclip1 movieClip2 movieClipadd TextA
EDIT: Simplified problem and clarified question. I am trying to convert this Stored Procedure

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.