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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:56:54+00:00 2026-05-20T22:56:54+00:00

I was wondering about creating fake URL queries in a web application. When you

  • 0

I was wondering about creating “fake” URL queries in a web application. When you put a .htaccess file in the root folder of a project you can rewrite (behind the scenes) this URL http://www.website.com/blog/view into http://www.website.com/index.php?q=blog/view. That way you can maintain a single access point and create a MVC application out of the path in $_GET["q"].

But what about actual query strings? Surely this type of rewrite doesn’t offer the flexibility of inputting a variable query string. Thus I liked the idea of the following:

http://www.website.com/blog/search?keywords=some+blog+post&limit=10&order=DESC

But the minute you put & symbols in your URL, things get smelly. For that reason I’m currently replacing the & symbols with | symbols

http://www.website.com/blog/search?keywords=some+blog+post|limit=10|order=DESC

But now a user could break my application by mistakenly putting a & symbol in the URL.

To sum up, what I’m wondering is if there is a way to “escape” the & symbols behind the scenes so that I could put & symbols in the URL, but my application would see | symbols (Or something like it)

Any other method of making this possible I would also love to hear

  • 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-20T22:56:55+00:00Added an answer on May 20, 2026 at 10:56 pm

    You want to use the Query String Append ([QSA]) flag on the end of your RewriteRule in your .htaccess file.

    For example:

    RewriteRule ^(.*)$ index.php?request=$1 [L,QSA] 
    

    The [QSA] flag on the rule says to take any pre-existing GET parameters and attach them to the new URI. So this:

    http://www.example.com/blog?post=123
    

    Becomes this:

    http://www.example.com/index.php?request=blog&post=123
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im wondering how to go about creating an online IRB that runs in the
Just wondering what people think about creating an area to hold/manage json based requests
Just wondering how you would go about creating the effect as seen in the
Was just wondering how I would go about creating a planar shadow from a
I'm just wondering about this one. I'm creating an ASP.NET webform containing lots of
I'm creating a PHP website which involves users signing up, and I'm wondering about
I was just wondering, how would I go about creating a browser based 3D
I'm wondering about instances when it makes sent to use #define and #if statements.
I'm wondering about MP3 decoding/encoding, and I was hoping to pull this off in
I've been wondering about the performance improvements touted in Java SE 6 - 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.