Questions tagged [querystring]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
59 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
0answers
10 views

RewriteRule with ProxyPass - Post Method Changed to Get

We have tried the following code in our server. There is a query string in POST method. Based upon the query string we will use proxypass for some users and for others, we will use same script. After ...
0
votes
0answers
23 views

Prevent error 403 on invalid URL parameter

I've links to my website which are clicked by users and not directly in my control to be changed or encoded properly. URL looks like this http://mywebsite.com?email=%%username@company.com I want ...
0
votes
1answer
37 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
20 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
123 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
89 views

Apache httpd rewrite url based on query string lookup

I need to rewrite URL to direct request to different backend servers based on query parameter, using a text map of (queryparam servername). I have tried the RewriteMap, RewriteRule with a prg: type ...
0
votes
0answers
43 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
0answers
168 views

apache2 hash rewrite condition

How can I add (#) hash in rewrite condition? I want only allow in Apache a comment like this comment_(\d+)_?(\d*). Example https://example.com/uri.jsp?comment=comment_1234_4 The default workflow ...
0
votes
1answer
52 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
766 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
3k 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=(.*)") { ...
0
votes
1answer
2k 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
1k 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
970 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
98 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
894 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
115 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 ...
-3
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
437 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
111 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
469 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
97 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
7k 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
266 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
3k 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
692 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
658 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 ...
6
votes
1answer
10k 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
182 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
2k 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:/...
11
votes
2answers
29k 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
632 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
2k 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
4k 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
4k 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
486 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 (...
7
votes
1answer
32k 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
10k 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 ...
2
votes
2answers
690 views

How do I do an .htaccess 301 redirect of a query string?

I'm trying to redirect a url http://domain.com/?p=106 to http://domain.com/?p=110 My .htaccess file looks like this: RewriteEngine On RewriteCond %{QUERY_STRING} ^p=106 RewriteRule / http://domain....
5
votes
2answers
38k views

How do you redirect URLs with a query string to another host?

This htaccess snippet is supposed to redirect myhost.com/?p=1&preview=true to alt.myhost.com/?p=1&preview=true RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^myhost.com$ [NC] ...
0
votes
1answer
435 views

Mod_Rewrite - Need Help With Old Url And Query String To New Url And Query String RewriteRu

How would I rewrite the following using mod_rewrite with wildcards: http://www.serverurl.com/glossary/WordFind.php?wordInput=(Dynamic Wildcard Word Here) to: http://www.serverurl.com/index.php?...