Questions tagged [querystring]

A query string is a part of the URL (uniform resource locator). It consists of pairs of attributes and values. For instance, the URL https://ahost:8443/test?id=21 has a query string with the attribute "id" whose value is "21"

Filter by
Sorted by
Tagged with
0 votes
1 answer
187 views

nginx remove all query parameters and add a new one to a react application

I want to discard all the query parameters and add a new one (for instance DN=$ssl_client_s_dn). The reason is to prevent the client from sending this query parameter. Replacing the value of the query ...
Ximo Dante's user avatar
1 vote
1 answer
409 views

nginx append query parameter to a react application

I am a beginner in Nginx and I want to append a query parameter to the URL (for instance myid) in order to serve a react application. I am using nginx/1.18.0 (Ubuntu) There are similar questions like: ...
Ximo Dante's user avatar
1 vote
1 answer
223 views

Nginx - Block access to portion of path only, to all but specified IP range

I'm trying block access to a portion of a path via Nginx, unless the source IP is within a specified range. I think I've got this mostly working through much trial and error, but I seem to run into ...
Ren's user avatar
  • 11
2 votes
1 answer
332 views

Sending selective args from Nginx proxy to the upstreams through proxy_pass

I have a Nginx proxy configured for a Minio S3 object storage server. Can I remove some of the query params (more than one agrs) when I'm passing a request to the upstream (Minio) and keep the rest of ...
Mehdi Hamidi's user avatar
1 vote
1 answer
683 views

Two different rewrite conditions in the same .htaccess?

I need to create a rewrite condition for two specific files, according to the requested path in the URL. It's possible? Condition 1: If the URL is example.com/admin go to admin.php?uri=params. That is:...
João Williams Balaniúc's user avatar
0 votes
1 answer
2k views

Redirect to a URL passed in the query string with Apache 2

I'm pretty newbie in URL redirection, and I would like to create this kind of redirection: http://example.com/?url=http://domain.test/ to http://domain.test/ The result I'm having so far is: http://...
Beelzeko's user avatar
1 vote
0 answers
143 views

IIS Rewrite URL not appending StringQuery

I'm trying to rewrite my URL FROM https://localhost/details.html?page=2 TO https://localhost/license When I use Redirect, it works perfectly when I request the URL https://localhost/license, but the ...
Wendel Souto's user avatar
0 votes
1 answer
1k views

http redirect and append client IP as URL query

i have this weird issue which we need as a workaoround for an internal application limitation. this is what I need, either from haproxy or nginx: something calls http://my-server/?some=query_string ...
flypenguin's user avatar
0 votes
0 answers
307 views

How to serve PHP on Nginx on a Query Parameter ?amp=1?

I have few virtual hosts (sites) running on this single server. Right now, on this root virtualhost i have a forum (running on Docker) but served by Nginx mysite.com and I have its AMP pages being ...
Faizan's user avatar
  • 111
1 vote
1 answer
8k views

Appending the query params the right way when using proxy_pass with nginx

I have my nginx proxy pass config setup as follows: location /try-me { proxy_pass https://some-domain.com?id=true&zone=false } This works fine. But the problem is when someone from the ...
Amanda's user avatar
  • 125
0 votes
2 answers
893 views

Query string issue with php-fpm and nginx

I am trying to run a PHP app using Nginx. Rewriting URLs work properly, however, query strings are not passed to the PHP files. Am I doing something wrong in the below configuration? I would ...
Gürkan Güran's user avatar
0 votes
0 answers
323 views

Can't use parentheses in RewriteCond QUERY_STRING

I need to capture a UID from an old url and redirect it to a new format. example.com/?uid=123 should redirect to example.com/user/123 What should work... RewriteCond %{QUERY_STRING} ^uid=(\d+)$ ...
musicin3d's user avatar
  • 141
0 votes
1 answer
448 views

Nginx Redirecting URL (301) with Query String to Final Destination in Single Chain

I need help with nginx redirection I want to redirect: example.com/new-clock/?bc=search&search_id=202 to www.example.com I have used this code in nginx config rewrite ^/new-clock/?bc=search&...
Dark9Y8's user avatar
  • 41
0 votes
0 answers
31 views

Apache RewriteRule, transfer string match into query string parameter

Our website has been redeveloped, and I have been asked to ensure that the previous form of certain URIs are redirected to the new form, so that existing links, bookmarks, etc, don't break. The ...
dave559's user avatar
  • 101
1 vote
1 answer
4k views

How to redirect URL with string query to the same URL without string query?

The URL(s) like below (there are 2 websites, one with www and other without it) https://example1.com/any-path-here/?_gl=1*um0ntk*_ga*...
M.K.Dan's user avatar
  • 13
0 votes
0 answers
163 views

nginx rewrite trying to find a file with query string included

I am trying to map friendly URLs to files in a legacy app. There is a file which will receive an action as a parameter to render different sections. I think that my rewrite condition is wrong because ...
Martignoni's user avatar
0 votes
1 answer
297 views

Apache redirect querystring value equal to specific domain

I need to restrict a particular Query String pattern which has a URL as below https://beta-portal.example.com/public/wp-login.php?redirect_to=http://demo.testfire.net I need to restrict the ...
Karthik's user avatar
0 votes
1 answer
2k views

I think Varnish is dropping my query string parameters

Our WordPress site has multiple views for every page and post depending on whether or not a specific query string is used. For example, if visited example.com/blog-post-with-chart (a page which ...
rugbert's user avatar
  • 83
2 votes
1 answer
7k views

How to redirect with query string in Nginx

I would like to redirect: something.com/search?keywords='value' to something.com/search?q='value' Here is my Nginx config: location ~ /search { if ($args ~* "keywords=(.*)") { ...
Ordidaad's user avatar
  • 121
1 vote
1 answer
5k views

nginx rewrite if query string exists

In the past a project was getting moved from / to /subdir. As the old URL structure was something like /index.php?foo/123/bar I used the following rewrite to get everything to /forum: rewrite ^\/...
KittMedia's user avatar
  • 238
1 vote
2 answers
3k views

HAProxy encode url for querystring

I have a system that needs to preserve the original referer over multiple redirects. To achieve this I'm trying to write the referer to the URL query string. I already got that working (somewhat). ...
elmo's user avatar
  • 55
1 vote
1 answer
2k views

nginx + fpm + subdirectory

I have an nginx config that looks like this: location ^~ /movies { alias /var/dp.cx/movies/current/public; fastcgi_index index.php; try_files $uri /movies/index.php; location ~* \....
Glen Solsberry's user avatar
2 votes
0 answers
387 views

Rewrite rule loses query parameters

I have a webserver running apache2 with php7. In my apache config, there is a redirect rule like the following: RewriteCond %{HTTP_HOST} !^www.* RewriteRule .* %{HTTP:X-Forwarded-Proto}://www.%{...
Stephan Richter's user avatar
0 votes
2 answers
1k views

phpMyAdmin and Apache - Query string - 404 Error

When phpMyAdmin tries to access URL as https://example.com/phpmyadmin/server_variables.php&filter=long_query_time, Apache throws a 404 Error. What might be the problem? The requested URL /...
devondre's user avatar
  • 103
1 vote
1 answer
2k views

iptables log url query string

I log and drop packets send to specific IP/domain name. I would like to be able to log url parameters for these dropped packet. This is an example url: http://somedomain.com/test.php?param1=test1&...
rostM's user avatar
  • 11
1 vote
1 answer
120 views

Seeing '?winzoom=1' on the end of request URLs; what is it?

We were poking in our web server access logs this morning and found a request with ?winzoom=1 on the end. Given that this web server only serves firmware upgrade files to IoT devices (that we also ...
Roger Lipscombe's user avatar
-2 votes
1 answer
3k views

Redirect domain with a query string to another domain? [closed]

I need to redirect a domain that does not have any content to another domain that is working. I have GoDaddy hosting. Domain 1: www.example-one.net: No content, just the domain. Domain 2: www.example-...
Momin Iqbal's user avatar
1 vote
1 answer
685 views

Dynamically Proxy 3rd party content to https

I'm using java and apache and I'm hosting non secure 3rd party content on my secure page and when I share my page on facebook, facebooks tab doesn't display the insecure content. I ran across an ...
George's user avatar
  • 145
0 votes
1 answer
134 views

Serve data from different locations depending on a query parameter

I would like to serve data on one and the same host from different directories depending on a query parameter using Nginx. For example https://foo.bar/index.html should be served from /var/www/foo ...
Kolyunya's user avatar
  • 207
1 vote
1 answer
1k views

nginx reverse proxy hide login query also on 301 redirect or full qualified url

I am spending now over two days on that issue, trying several servers (apache, now nginx), searching the whole web, but had no luck so far. First: sorry for posting my urls with http-s instead of ...
Ranunculum's user avatar
1 vote
0 answers
106 views

mod_rewrite leads to 404

I'm trying to redirect (internally) example.com/snippets/_filename_ to example.com/snippets/?f=_filename_ using mod_rewrite... And it is not working. The contents of my .htaccess file, which is ...
Hussain Khalil's user avatar
0 votes
1 answer
2k views

IIS Request Filtering - Why filter querystrings

In IIS7 & 8 Request Filtering feature, you can have rules to allow or deny URL and QueryString. I get why you would want to block sequences that comes in with attack vectors such as drop or ...
DomBat's user avatar
  • 149
5 votes
2 answers
12k views

Nginx & PHP-FPM: Query parameters won't be passed to PHP

I am currently setting up a machine for local development using Vagrant. Everything runs as it should, expect query parameters aren't passed to PHP on subpages. That means on www.example.com/?a=b, ...
Sven's user avatar
  • 151
1 vote
1 answer
2k views

Set Access-Control-Allow-Origin Header for specific URL that has a Query String

I'm asking this here as a last resort after trying different things / asking google / reading http://httpd.apache.org/docs/2.2/ I have the following in my apache2.conf # Allow cross domain fonts ...
Emmanuel Figuerola's user avatar
0 votes
1 answer
439 views

.htaccess entry to return simple text based on the URI

I have URL http://foo.com/bar?abc=123, what would be the correct entry in the htaccess file to return a simple text 200 status of abc=123? Basically, I just want to return the entire query string as ...
coneybeare's user avatar
1 vote
1 answer
4k views

Nginx proxy_pass based on file extension and query string

I need to proxy_pass static assets (.js .css) based on file extension and query strings. For example: domain.com/foo.css - go to upstream1 domain.com/foo.css?V=1234 - go to upstream2 Reason is I ...
Radoslav Stefanov's user avatar
1 vote
1 answer
5k views

How to modify querystring using URL rewriting?

I am having very less knowledge in URL rewriting, So not sure weather this can be done or not using URL rewrite? I have a URL like www.test.com/categroy.cfm?categoryid=12&weight=any&brandid=...
user3427540's user avatar
0 votes
1 answer
2k views

Ignore utm_* values with varnish?

Can I 'ignore' query string variables before pulling matching objects from the cache, but not actually remove them from the URL to the end-user? For example, all the marketing utm_source, ...
Tallboy's user avatar
  • 179
0 votes
1 answer
1k views

MOD_REWRITE for rewriting GET requests [duplicate]

I need a .htaccess expression to use the second get variable or get the get variable by name. Currently my mod_rewrite alters the URL to remove index.php filename and alter the pageName GET variable ...
user3314676's user avatar
1 vote
1 answer
952 views

Nginx no-cache header for ?random query string

On an Nginx install using WordPress with the Jetpack plugin, it has the ability to use domainname.com/?random to redirect to a random blog post. The problem is that this page is getting cached and ...
Kevin Worthington's user avatar
10 votes
1 answer
14k views

Nginx ignore query string for caching certain files

I know my setup is a bit crazy, but whatever.... I set up Nginx on Openshift to cache map tiles (for a map viewer, you can guess the purpose, :-) ) that are served from my home network, which has ...
Andrew Sun's user avatar
0 votes
2 answers
195 views

htaccess redirect querystring value

I need to redirect www.URL.it/directory_one/index.php?param_one=XXX&param_two=**YYY** to www.URL.it/newpage.php?param_three=**YYY** I tried all I found online but the only things that works is ...
Luciano Michelini's user avatar
0 votes
1 answer
3k views

Nginx Rewrite with a question mark

I am trying to force Nginx to redirect/rewrite one URL that uses a query string /?cat=20 to /category/lighttpd/. Here is what I tried, which is not working: location ~ /\?cat=20 { rewrite ^ http:/...
Kevin Worthington's user avatar
6 votes
2 answers
12k views

RedirectMatch and Query String

Compare these two RedirectMatch's. The first doesn't work: RedirectMatch 302 ^/redirect\.php[?]page=(.+)$ http://somewhereelse.com/$1 Versus this, which will redirect to http://somewhereelse.com/?...
nate's user avatar
  • 207
13 votes
2 answers
36k views

Nginx Rewrite Convert Querystring to Path

I whould like this simple rewrite rule: /somefolder/mypage.aspx?myid=4343&tab=overview to be redirected to: /folder/4343/overview/ I looked for some solutions and none actually worked.. I ...
YardenST's user avatar
  • 255
1 vote
2 answers
2k views

How do I drop a slash from the middle of a URL with a query string?

I have some domain redirects that point to a page on my server, and they stick a trailing slash after the filename but before the query string. So this: http://hydesim.com?dll=40.71427,-74.00597&...
Eric A. Meyer's user avatar
2 votes
1 answer
881 views

Lighttpd QUERY_STRING escape properly

Problem is to escape query string in Lighttpd: This is url: domain/publisher/adframe-34.html?tag=xzzx&gg=yy&uu=121 and this is lighty rule: adframe-([1-9][0-9]*)\.html\?(.*)" => "ad/...
Nenad Milosavljević's user avatar
2 votes
1 answer
3k views

nginx rule to capture header and append value as query string

I have an interesting problem I need to solve in nginx: one of the sites I'm building receives inbound traffic on port 80 (and only port 80) which may have a certain header set in the request. If this ...
John Schulze's user avatar
0 votes
2 answers
1k views

Do proxies and/or load balancers alter HTTP query strings by default?

Introduction to the problem Recently I was working on some request signing algorithm and it came out the opinions about including query string in the part that is then signed are "diversified". Long ...
Tadeck's user avatar
  • 119
5 votes
1 answer
8k views

NGINX proxy caching - cache buster variable in querystring - possible to ignore?

We have the following url we would like to proxy cache: file.php?parameter=one&paramater2=two&r=EPOCHTIMESTAMP Query string parameter "parameter" varies between requests. So does "paramater2"...
anonymous-one's user avatar