Skip to main content

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
0 answers
31 views

.htaccess - Apache rewrite rules, some work, some don't

this Rewrite rule is forwarding to url: https://www.fliesen-alfers.de/fliesennivelliersysteme/verlegefix-keilsystem/basis-sets/1-5-mm-basis-set/?number=102 as expected: RewriteCond %{QUERY_STRING} (^|&...
user24710148's user avatar
0 votes
0 answers
63 views

Remove Query String from Redirected URL $request_uri?

I am new to Nginx and I'm facing an issue with my Nginx configuration. I have set up a list of redirects using the map directive ($request_uri) as shown below: map $request_uri $staticRequestRedirect {...
petterik's user avatar
0 votes
1 answer
335 views

Apache - Is it possible to rewrite urls based on fragments (hashtag)?

Using Apache/2.4.54 (Win64) I have been requested to rewrite from old domain to new like this From https://oldtest.mydomain.com/company/customerpage/#/customer/<getThisNumber>/something To ...
rhellem's user avatar
  • 315
0 votes
1 answer
45 views

RApache get Query String from executing URL - howto?

I would like to get the query string from the executing URL into my R. I've installed and configured R Apache. Everything works to this extend. My R code so far is: query_string <- Sys.getenv("...
Simon Giesen's user avatar
0 votes
1 answer
297 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
971 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
553 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
637 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
899 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
3k 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
301 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
2k 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
434 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
3 votes
1 answer
13k 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
  • 145
0 votes
2 answers
1k 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
406 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
549 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
38 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
239 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
354 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
3k 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
  • 93
3 votes
1 answer
8k 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
  • 131
1 vote
1 answer
6k 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
  • 248
1 vote
2 answers
4k 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
452 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
124 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
782 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
221 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
  • 217
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
113 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
3k 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
6 votes
2 answers
13k 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
  • 161
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
532 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
  • 189
0 votes
1 answer
2k 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
1k 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
15k 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
201 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
13k 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/?...
pinate's user avatar
  • 207
14 votes
2 answers
37k 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
  • 275
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