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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:05:01+00:00 2026-06-14T04:05:01+00:00

i was unable to find answer, so there it is: i need to get

  • 0

i was unable to find answer, so there it is:

i need to get URL like this: //mydomain/index.php?var=username (or https:// if user want secure connection).

To use nice URL I want to use: //mydomain/user/username (this should stay in the browser URL line) to get: //mydomain/index.php?var=username

I have configured .htaccess to:

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

But it doesn’t work. When i use redirection [R,L] it works fine, but in the URL line of browser is the ugly URL after it 🙁

Please can You help me, what i have wrong?

  • 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-14T04:05:03+00:00Added an answer on June 14, 2026 at 4:05 am

    Your comment

    It doesn’t return error, it shows the page, but it seems, that the URL is something like this: //mydomain/user/
    instead od //mydomain/ so all links (including relative paths are
    directed to //mydomain/user/… instead of //mydomain/…)

    Describes normal (expected) behaviour. Your browser thinks the page is being served from //mydomain/user/userid so all relative links will be resolved using the base path //mydomain/user/. What’s more, your htaccess rule allows an optional trailing slash so //mydomain/user/userid/ is also valid. A request like that will resolve all links relative to //mydomain/user/userid/, so an href of “foo.html” will point to //mydomain/user/userid/foo.html.

    The only real solution here is to make all your links relative to the root folder by adding a “/” at the start. For instance, instead of things like:

    <a href="foo.html">
    <img src="images/pic.jpg" alt="" />
    <link rel="stylesheet" type="text/css" href="css/styles.css" />
    <form action="processme.php" method="post">
    

    You should use

    <a href="/foo.html">
    <img src="/images/pic.jpg" alt="" />
    <link rel="stylesheet" type="text/css" href="/css/styles.css" />
    <form action="/processme.php" method="post">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been unable to find any info on this, which seems like it could
After extensive searching on this matter, I have been unable to find an answer
I've searched for an answer to this question and have been unable to find
I can't find a decent answer to this question. I see there are a
There must be an easy answer to this question, but I'm still unable to
I've been unable to find a definitive answer to whether custom tags are valid
That may be really simple but I'm unable to find a good answer. How
I have been unable to find any decent documentation on this function. The code
I have searched already but unable to find an answer that works. I simply
Ok, I've searched quite a bit, but seem unable to find an answer or

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.