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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:27:01+00:00 2026-06-04T15:27:01+00:00

I have a small personal project I’m working on, and before I get too

  • 0

I have a small personal project I’m working on, and before I get too deep into it, I’d like to get some opinions here on the best practices regarding the set up and URL scheme… and how I might set up the .htaccess rewrites for the following. My questions are:

  1. Is the below set up the best way to manage user information in a small user profile setup?

  2. I have worked out how to get the subdomain working for the rewrite username.domain.com with wildcard subdomains and httpd.conf file set up… but I am stuck on the rest of the scheme seen below. Basically, a user profile will always result in username.domain.com and then appended with the various pages within their account (photos, videos, notes etc). How would I set up the .htaccess rewrites to accommodate this? I really appreciate any advice here. I have done a ton of research here on stackoverflow, and on other sites, but I can’t find a decent explanation to achieve this.

Thanks for any help.

www.domain.com/profile.php?u=username –> username.domain.com

www.domain.com/photos.php?u=username –> username.domain.com/photos

www.domain.com/photos.php?u=username&a=album –> username.domain.com/photos/album

www.domain.com/photos.php?u=username&a=album1&p=photoid –> username.domain.com/photos/album1/photoid

www.domain.com/settings.php?u=username –> username.domain.com/settings

etc

  • 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-04T15:27:02+00:00Added an answer on June 4, 2026 at 3:27 pm

    Your proposed setup looks fine to me. Here are some rules for .htaccess (make sure you have mod_rewrite enabled and AllowOverride All set in your httpd.conf):

    RewriteEngine on
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} (.*)\.domain\.com
    RewriteRule ^$ http://www.domain.com/profile.php?u=%1 [L,QSA]
    
    RewriteRule ^photos/?$ http://www.domain.com/photos.php?u=%1
    
    RewriteRule ^photos/([^/]+)/?$ http://www.domain.com/photos.php?u=%1&a=$1
    
    RewriteRule ^photos/([^/]+)/([^/]+)/?$ http://www.domain.com/photos.php?u=%1&a=$1&p=$2
    
    RewriteRule ^settings/?$ http://www.domain.com/settings.php?u=%1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a personal project, I'm working on a small web-based game. I have a
I have a personal project I'm planning and I came to a small hurdle.
I have a personal Mercurial repository tracking some changes I am working on. I'd
I'm trying to make a small calculator, as a personal project. I have a
I'm working on a small personal project and I need to create a non-rectanguar
I recently started working on a small personal project in Ruby on Rails, and
I'm working on a small, personal project and am using Subversion to manage the
I'm working a small, personal Django project and I've added South (latest mercurial as
I'm trying out CorePlot in a small personal project to draw some bar graphs.
I have small class called 'Call' and I need to store these calls into

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.