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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:15:44+00:00 2026-06-13T13:15:44+00:00

I know there are TONS of questions on this website regarding this topic, as

  • 0

I know there are TONS of questions on this website regarding this topic, as well as TONS of tutorials around google. However I have searched for a while now and I cannot seem to find one that explains my specific situation.

I am building a social application in which the whole application is being stored in a directory of a subdomain the website like so: subdomain.example.com/network/ <– network being the directory of all the application files.

I have my .htaccess file located in the root of the subdomain and as of right now I have it removing .php from all the files and that is working throughout the entire project as it should. I have a user.php page which each user’s profile is based off and the unique identifier for each user is their username (not ‘id’ like most people use.) So right now the urls look like /network/user.php?username=TylerB which is not very pretty. I have tried many different things to get this to look like /network/user/TylerB but nothing I try seems to work. I don’t know if it’s because it’s in a directory, a subdomain or what. As of right now, when I have /network/user/TylerB (TylerB is my username) it gives me a 404 error.

Here is my current .htaccess file:

RewriteEngine On
RewriteRule ^user/([^/\.]+)/?$ user.php?username=$1 [L]
RewriteRule ^([a-z]+)/([a-z\-]+)$ /$1/$2.php [L]
  • 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-13T13:15:45+00:00Added an answer on June 13, 2026 at 1:15 pm

    I would recommend setting the RewriteBase directive and matching on the full pattern, making sure to rewrite to the /network/ directory.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^network/user/([^/\.]+)/? /network/user.php?username=$1 [L]
    RewriteRule ^([a-z]+)/([a-z\-]+)$ /$1/$2.php [L]
    

    Using the testing tool at http://htaccess.madewithlove.be/ I get an output of:

    This rule was met, the new url is http://example.com/network/user.php?username=name
    The tests are stopped because the L in your RewriteRule options
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are tons of threads regarding this issue but I have not
There are tons of questions about this topic, but I have a slightly altered
I know there are tons of questions about this already floating around SO but
I know there are a lot of questions around on this subject, but I've
I know that there are tons of questions like this one, but I couldn't
I know that there are tons of questions like this on SO, but I
So I know there are tons of questions similar to this but I havent
OK, I know there are tons of questions like this, but for some reason
I know that there are tons of similar questions because I have read them
I know there have been many questions on grid and pack in the past

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.