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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:30:23+00:00 2026-06-08T18:30:23+00:00

I have searched around but can’t find the answer to this relatively simple question;

  • 0

I have searched around but can’t find the answer to this relatively simple question;
how change the visible URL, AND send it to a certain file.

This is my .htaccess

RewriteEngine On
RewriteRule ^xyz/([A-Za-z0-9\ -]+)$ index.php?xyz=$1 [L]

Links are built like mydomain.com/xyz/uniquecode

Above Rewriterule triggers the file index.php?xyz=uniquecode

But I ALSO want it to change the visible URL to mydomain.com or maybe mydomain.com/someotherfolder

How do I do it?
I think I have to create some rewrite conditions but not sure how.
Thanks in advance.

……………………………………………………………………………………….

EDIT :

Just to clarify:
What I want is to give out personal links like

mydomain.com/affiliate/users-unique-code-here and when the link is clicked the url in the browser instead show

mydomain.com or

mydomain.com/somefolder

while it of course trigger my file index.php?affiliate=users-unique-code-here

It should be possible to do all this in the .htaccess

  • 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-08T18:30:24+00:00Added an answer on June 8, 2026 at 6:30 pm

    yes start_session(); if (isset($_GET['xyz'])){$_SESSION['topost']=$_GET;header('location: mydomain.com');} if (isset($_SESSION['topost'])){$_GET=$_SESSION['topost'];unset($_SESSION['topost']‌​);}
    if isset $_GET save it and set location, at the new location if exists saved data, set it to the $_GET and new visible address but $_GET is the same

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

Sidebar

Related Questions

I have searched around for an answer to this but can't find one. When
I've searched around but I can't find my issue. I have a simple script
I searched around but couldn't find an answer. I'm not sure if this is
I searched around but I could find an answer. Is there anywhere I can
I searched around but couldn't find exactly what I'm looking for. I have a
I have searched around Google and StackOverflow trying to find a solution to this,
I have searched for a general solution to this but only find answers to
I've searched through related questions but can't find what I need. I have a
I have searched around but wasn't able to find a solution. What I want
I have searched through google and SO for possible answers to this question, but

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.