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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:34:05+00:00 2026-05-29T21:34:05+00:00

I am building a download site, An users will be able to register and

  • 0

I am building a download site, An users will be able to register and a folder with their username will be created on my server, something like: home/users/username

What I want to accomplish is, if anyone types: username.domain.com in their browser, it will route them to: home/users/username/, and if they type: username.domain.com/file.mp3, it will route them to: home/users/username/file.mp3

If its possible to accomplish sub folders routing, that would be great full aswell, example; home/users/username/sub/file.mp3

Thanks guys

  • 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-29T21:34:06+00:00Added an answer on May 29, 2026 at 9:34 pm

    Try adding the following to the .htaccess file in the root directory of your site.

    This will rewrite any request to username.domain.com to the correct folder/subfolder and file.

    I am assuming that home is a directory in the root folder of your site.

    RewriteEngine on
    RewriteBase / 
    
    #if request for usename.domain.com/anything
    RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$ [NC] 
    #send any request that is not already for home/users to home/users/username/anything
    RewriteRule ^(?!home/users/) home/users/%1%{REQUEST_URI} [L,NC] 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a little tool that will download files using wget, reading the urls
Building a new Mobile Web Platform for Mobile Users to purchase & download content
I am building a site that allows the user to download a set of
I am building a mobile site that works like a slideshow. There are a
I'm building a site where the user can download ePub files and Adobe Digital
I'm building a web app for GAE where logged-in users may download potentially large
I'm planning a site which needs the users' trust. To help trust building, I
I'm building a file sharing site, and I'm thinking, I want my users to
What would be a scalable file upload/download system/database? I'm building a website where users
I'm building a download manager in python for fun, and sometimes the connection to

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.