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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:49:46+00:00 2026-05-28T01:49:46+00:00

I have a web page with basicly the following URL structure: www.example.com/main.php?userId=mattias.wolff www.example.com/definitions.php?userId=mattias.wolff www.example.com/tasks.php?userId=mattias.wolff

  • 0

I have a web page with basicly the following URL structure:

www.example.com/main.php?userId=mattias.wolff
www.example.com/definitions.php?userId=mattias.wolff
www.example.com/tasks.php?userId=mattias.wolff
www.example.com/profile.php?userId=mattias.wolff

What I would like to do is to change this to get rid of the parameters:

www.example.com/mattias.wolff
www.example.com/mattias.wolff/definitions
www.example.com/mattias.wolff/tasks
www.example.com/mattias.wolff/profile

Server side this is not a problem since I can just use mod rewrite to rewrite the URLs to the “old” format (including paramters etc.)

My question is how this should be handled client side? The pages content is very much generated by JavaScript and I therefore need to get the parameters in the same way as before.

Is there some best practice that I have missed here? Writing a function on that parse the new URL in Javascript or send the “old” URL from server side in some kind of parameter?

  • 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-28T01:49:47+00:00Added an answer on May 28, 2026 at 1:49 am

    Do not forget that essentially, the URL is a (kind of a) query, too. The main difference here is whether you are using named parameters or positional parameters.

    The ? notation is essentially a standard to allow browser to construct an URL from a form query automatically.

    You could as well be using URLs of the scheme:

    www.example.com/name=mattias.wolff/page=definitions
    

    if that is what you want.

    My recommendation for you is to really define a URL scheme for your pages that completely suits your needs and has enough room for future extension. Ideally, you should be able to switch back to the old scheme at some point if necessary, without major name conflicts.

    There is clearly nothing wrong with organizing your URLs in the scheme of /[username]/[page], and using this scheme from JavaScript (both for parsing and generating links!) as long as you don’t change it all the time.

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

Sidebar

Related Questions

Have small web page at www.peterbio.com/mom/test.htm Someone wrote the code with mouse over and
I have a web page http://www.maryveale.com/sculpture/index.html that loads a js at /media/js/bill-studio.js that causes
I have web page in PHP which displays all records in a table. I
I have a web page x.php (in a password protected area of my web
i have web page it has a page header content like main menu,logo and
I have web page which is passing a querystring parameter to page 2: <a
I have a web page that includes a bunch of images. Sometimes the image
I have a web page which contains a select box. When I open a
I have a web page in which people go to register for my site.
I have a web page with DIV s with a mouseover handler that is

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.