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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:46:14+00:00 2026-06-14T15:46:14+00:00

Sorry for the confusing/vague question title. I couldn’t come up with a better one.

  • 0

Sorry for the confusing/vague question title. I couldn’t come up with a better one.

THE SITUATION

Suppose a page abc.php has a set of anchor tags.

<a href="xxx.php">AAA</a>
<a href="xxx.php">BBB</a>
<a href="xxx.php">CCC</a>

If I click on BBB, is there way to find out inside xxx.php that BBB was the link which brought it here? In the same way if CCC is clicked, can it be known in xxx.php that the redirection took place because of CCC link?

In a nutshell, I’m looking for a set of links redirecting to a single page and in that page determine which link caused the redirection.

PS : I know I can do that using query strings but I would prefer to avoid them as much as possible. Also I would also like it to be in PHP only (if possible, i.e. server side; something like $_SERVER['HTTP_REFERER']).

  • 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-14T15:46:15+00:00Added an answer on June 14, 2026 at 3:46 pm

    If you don’t want to expose query strings on the client (I don’t see a reason for avoiding them for the scope of your problem) an you want all to be performed on the server side you can try using the rewriting rules on Apache.

    Something like

    <a href="xxx_aaa">AAA</a>
    <a href="xxx_bbb">BBB</a>
    <a href="xxx_ccc">CCC</a>
    

    And rewrite a rule in your .htaccess like:

    RewriteRule ^xxx_(.*)$ xxx.php?id=$1
    

    And within your script you could know where it came with

    $_REQUEST['id']
    

    Yes, at the end you are using a query string even if you are not exposing it, but solutions like $_SERVER[‘HTTP_REFERER’] will not work.

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

Sidebar

Related Questions

Sorry if the question title is confusing. Let me explain further. I am building
Sorry for the confusing title of the question. I am uncertain about how should
Sorry for the confusing title, I didn't know how I could describe it better.
I'm sorry if the title is confusing but I couldn't think of anything similar
Sorry about the confusing title, I'll explain better. I have a 20x20 grid of
sorry for my confusing question. let me rephrase the details: $query = SELECT *
sorry for the confusing title, its really hard for me to explain what i
Sorry for the confusing title, but it basically says it all. Here's the structures
Sorry for the confusing question, but what I'm trying to do is store an
Let me first start off, sorry for the confusing title. I didn't know 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.