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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:48:09+00:00 2026-06-07T18:48:09+00:00

(Sorry if this is a repeat question, I had a hard time thinking of

  • 0

(Sorry if this is a repeat question, I had a hard time thinking of how to search for it, and just came up with thousands of results about how to make 404s work.)

I’m trying to build a PHP website that would roughly follow the form: http://www.example.com/user/MrPoopPants

And I was wondering the best solution for that. In also trying to figure out how URL shorteners redirect, one website suggested sending every request through a 404, and have the 404 error page assess the data with $_SERVER['REQUEST_URI']

With that, you could just preg_split, and ask a database if there is a user named MrPoopPants, then just build your site with PHP based on includes and he database.

The two problems I don’t like with this are: I am using a 404 for every page in the website, that seems like a really bad thing; I am also relying on a single php file for the entire website, which seems like bad form.

What would the best way to go about this be? EDIT: That is, I realize this is a bad practice, what is the solution? How do I detect the URL information without having it redirected to a 404? How do I set up a page so that when you do /user/manboy it knows to let /user/user.php read the URL and build the page?

  • 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-07T18:48:11+00:00Added an answer on June 7, 2026 at 6:48 pm

    You are essentially asking about URL rewriting. An excellent tutorial for beginners explaining all the important bits and bytes of mod_rewrite can be found here.

    The PHP part of handling rewritten requests is I am afraid PHP 101 which no one can simply “explain” to you. You need to have a specific question about a very specific problem in order for people to be able to actually help you.

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

Sidebar

Related Questions

Sorry this is not a very well defined question, I am thinking about an
Sorry this is a basic question, but all my research just barely missed answering
Sorry if I repeat my question but I have still had no clues of
Question: Hello All, Sorry that this is kind of a noob question. I just
Sorry in advance if this is a repeat question. I didn't see it listed
Sorry if this sounds like a very basic question, it is my first time
I am sorry if this is a repeat question. How do I write a
Sorry if this is a repeat question. I've looked at other threads, but while
I'm sorry for ambiguous title, but this question is hard for me to put
sorry this is such a simple question but I can't figure it out. How

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.