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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:48:36+00:00 2026-06-14T10:48:36+00:00

I have a website where each person has his personal profile. I would like

  • 0

I have a website where each person has his personal profile. I would like to have static URL like mywebsite/user1, mywebsite/user2, but actually I would remain in the same page and change the content dynamically. A reason is that when I open the site I ask to a database some data, and I don’t want to ask it each time I change page.
I don’t like url like mywebsite?user=1

Is there a solution?

Thank you

[EDIT better explenation]

I have a dynamic page that shows the user profile of my website. So the URL is something like http://mywebsite.me?user=2
but i would like to have a static link, like
http://mywebsite.me/user2name

Why I want this? Because it’s easy to remember and write, and because i can change dynamically the content of the page, without asking each time data to my database (i need some shared info in all the pages. info are the same for all the pages)

  • 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-14T10:48:38+00:00Added an answer on June 14, 2026 at 10:48 am

    Yes there are solutions to your problem!

    The first solution is server dependend. I am a little unsure how this works on an IIS server but it’s quiet simple in Apache. Apache can take directives from a file called .htaccess. The .htaccess file needs to be in the same folder as your active script to work. It also needs the directive AllowOverride All and the module mod_rewrite loaded in the main server configuration. If you have all this set up you need to edit your .htaccess file to contain the following

    RewriteEngine on
    RewriteRule ^mywebsite/([^/\.]+)/?$ index.php?user=$1 [L]
    

    This will allow you to access mywebsite/index.php?user=12 with mywebsite/12.
    A beginner guide to mod_rewrite.

    You could also fake this with only PHP. It will not be as pretty as the previous example but it is doable. Also, take into concideration that you are working with user input so the data is to be concidered tainted. The user needs to access the script via mywebsite/index.php/user/12.

    <?php
        $request = $_SERVER['REQUEST_URI'];
        $request = explode($request, '/'); // $request[0] will contain the name of the .php file
        $user[$request[1]] = $request[2];
    
        /* Do stuff with $user['user'] */
    ?>
    

    These are the quickest way I know to acheive what you want.

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

Sidebar

Related Questions

I have a website thats essentially a people directory. Each person has a profile
Suppose that we have a web site where each person has a profile and
I have a website with photo gallery and I'd like to upload each photo
I have a section of a website that has three divs next to each
I have a gallery of images on my website. Under each one, I'd like
I have a collection with information on visitors to a website, each visitor has
Is it possible to have a website where each user gets their own URL
Lets say I've a website that lists Persons, and each Person has multiple properties,
I have a website about festivals, with a separate page for each festival. Normally,
I have a website with three domains .com, .de and .it Each domain needs

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.