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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:07:52+00:00 2026-05-28T00:07:52+00:00

Due to a reverse proxy setup I’m having to pass an extra query var

  • 0

Due to a reverse proxy setup I’m having to pass an extra query var which the proxy can’t using mod_rewrite. The proxy is at /search however I’m using /find on all pages as a mod_rewrite to /search to pas the query var s=gsacollection.

See example:

# Direct link to search which passes collection var
# eg http://www.domain.com/find
RewriteRule ^find$ /search?s=gsacollection [NC]

#Rewrite all query vars
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^find(.*)$ /search?%1 [NC,L] 

I’m trying to capture multiple variables for mod_rewrite that are being sent. The issue is I don’t always know which ones are being sent over. This is an attempt to blanket capture them. Suggestions?

I want to pass all the query strings after /find? to /search?

EG here are some sample URIs coming in:

find?q=test&sort=date:D:L:d1&num=10&s=gsacollection&l=en&start=10

find?q=tfsa&sort=date:D:L:d1&num=10&s=gsacollection&l=en&filter=0

find?q=tfsa&filter=0&num=10&s=gsacollection&l=en&sort=date%3AD%3AS%3Ad1

If a blanket capture won’t work then I will have to look at setting up multiple RewriteCond rules, wondering if there’s a way I can combine these in a way I can pass vars from each condition to build the rewrite rule (eg group)?

# Grab everything after /find and replace with /search if these query vars exist
RewriteCond %{QUERY_STRING} q=(.*) [AND]
RewriteCond %{QUERY_STRING} s=(.*)
RewriteRule ^find(.*)$ /search$1 
  • 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-28T00:07:52+00:00Added an answer on May 28, 2026 at 12:07 am

    Try using this code in your .htaccess file under $DOCUMENT_ROOT:

    Options +FollowSymLinks -MultiViews
    RewriteEngine on
    
    RewriteOptions MaxRedirects=10
    
    RewriteRule ^find/?$ search?s=gsacollection [QSA,L,NC]
    

    Make sure you don’t have any other conflicting mod_rewrite rule here. QSA flag will make sure to append all query parameters to merge with s=gsacollection parameter.

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

Sidebar

Related Questions

I am having a problem using const reverse iterators on non-const containers with gcc.
Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon
Due to a weird request, I can't put null in a database if there
Due to lack of capital and time we are having to do our game
Due to a merger, we have inherited a couple of legacy apps which run
I am using Google Maps V3 API and using its Geocoder to do reverse
Due to the problem I posted here Mootools when using For(...in Array) problem about
Using MySQL Workbench I reverse engineered phpbb's database to see what the schema would
I have currently a DNS Reverse lookup script which works however there is a
Due to some reason I cannot change the query so I have to do

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.