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

  • Home
  • SEARCH
  • 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 6538485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:44:29+00:00 2026-05-25T10:44:29+00:00

Does anyone have any idea if it is possible to put additional variables into

  • 0

Does anyone have any idea if it is possible to put additional variables into a URL that you are using mod_rewrite to basically chop up into variables.

For example, if I have the URL:

website.com/post/53/post-title/

and I am using mod_rewrite to turn it into:

website.com/post.php?postid=53

Is there and elegant way to put additional variables into the “pre-rewritten” URL and keep them for my post.php script?

I.E., what if I create a link like the following:

website.com/post/53/post-title/?anothervar=6

So far it seems like my mod_rewrite code is just throwing out the additional variable and sending the URL to the post.php script like this:

website.com/post.php?postid=53

I do know that I can use $_SERVER['REQUEST_URI'] to get the original URL in my php script (AKA website.com/post/53/post-title/?anothervar=6) before it gets rewritten by mod_rewrite and then just chop up the string to get that added on variable, but I just wanted to know if there was a more elegant solution that solely used mod_rewrite.

  • 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-25T10:44:30+00:00Added an answer on May 25, 2026 at 10:44 am

    you can also use %{QUERY_STRING} to pass original query string to new url. or use it as you wish e.g.

    RewriteRule /pages/(.*) /page.php?page=$1&%{QUERY_STRING} [R]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any idea how it would be possible to transition from business
Does anyone have any idea if this is possible? Most of the sample for
Does anyone have any idea what is wrong with this create statement for mysql?
Does anyone have any recommendations of tools that can be of assistance with moving
Does anyone have any recommendations for implementations of ActiveRecord in PHP? I've been using
Does anyone have any idea on how can you create a product filtering query
I need to archive data from a CRM system. Does anyone have any idea
Does anyone have any idea why money_format() is showing � instead of pound sign
Does anyone have any experience getting MSTest to copy hibernate.cfg.xml properly to the output
Does anyone have any practical suggestions about how to manage feature creep in GUIs?

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.