Questions tagged [querystring]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
55 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://...
1
vote
0answers
9 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 ...
0
votes
1answer
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 ...
0
votes
0answers
89 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 ...
1
vote
1answer
563 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 ...
0
votes
2answers
218 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 ...
0
votes
0answers
100 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+)$ ...
0
votes
1answer
113 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&...
0
votes
0answers
22 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 ...
1
vote
1answer
1k 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*...
0
votes
0answers
61 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 ...
0
votes
1answer
89 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 ...
0
votes
1answer
1k 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 ...
2
votes
1answer
5k 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=(.*)") { ...
1
vote
1answer
3k 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 ^\/...
1
vote
1answer
2k 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). ...
1
vote
1answer
1k 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 ~* \....
1
vote
0answers
130 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.%{...
0
votes
2answers
923 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 /...
1
vote
1answer
1k 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&...
1
vote
1answer
116 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 ...
-2
votes
1answer
2k 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-...
1
vote
1answer
507 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 ...
0
votes
1answer
112 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 ...
1
vote
1answer
669 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 ...
1
vote
0answers
102 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 ...
0
votes
1answer
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 ...
4
votes
2answers
9k 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, ...
1
vote
1answer
1k 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 ...
0
votes
1answer
327 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 ...
1
vote
1answer
3k 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 ...
0
votes
1answer
4k 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=...
0
votes
1answer
1k 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, ...
0
votes
1answer
991 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 ...
1
vote
1answer
744 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 ...
7
votes
1answer
12k 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 ...
0
votes
2answers
186 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 ...
0
votes
1answer
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:/...
6
votes
2answers
10k 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/?...
13
votes
2answers
32k 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 ...
1
vote
2answers
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&...
2
votes
1answer
718 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/...
2
votes
1answer
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 ...
0
votes
2answers
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 ...
4
votes
1answer
5k 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"...
2
votes
2answers
5k views

SQL query to Automatically Export to file and FTP?

I am wondering if there is such a way to automatically run SQL queries and export to file (example: csv file) and then FTP to desired location? It seems simple and would need something like this as it ...
1
vote
0answers
493 views

Apache configuration for silent rewrite of query strings like codeigniter

Codeigniter rewrites query strings like the following: http://somedomain.com/index.php?q=something to become: http://somedomain.com/index.php/q/something I'd like to imitate this behavior on a (...
8
votes
1answer
35k views

IIS URL Rewrite Module Query String Parameters

Is it possible to use URL Rewrite to provide more complex query string functionality than the "Append query string" checkbox that it has? Specifically, is it possible to specify the keys for certain ...
3
votes
1answer
11k views

Use apache to block a url with specific query string

I have this url: mysite.com?var=var&var2=var2&var3=var3 I would like to block this specific url but not in any way affect other query strings on the same base url. Is it possible to do this?...
13
votes
1answer
6k views

Apache mod_rewrite double encodes query string on redirect

We've encountered a strange issue (a bug, perhaps?) with Apache mod_rewrite's behavior when passing through query strings. To reproduce, we've set up a clean Ubuntu (oneiric) install with the default ...