logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: match a query string with url as value
Author
roquesao



Joined: 30 Dec 2014
Posts: 1
Location: Argentina

PostPosted: Tue 30 Dec '14 16:14    Post subject: match a query string with url as value Reply with quote

Hi I want to match a query string with modrewrite , the problem is that my query_string has a url as value:

%{QUERY_STRING} next=https://play.google.com/store/apps/details?pepe=1

and it doesn't work for me.

input='next=https://play.google.com/store/apps/details?pepe=1'
patttern='next=https://play.google.com/store/apps/details?pepe=1' => not-matched

but if I had to match only the uri , it works , the problem is when I try to add parameters to the query_string url:

http://someurl.com?next=https://play.google.com/store/apps/details?pepe=1


is there any way to match that kind of query_string?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 02 Jan '15 0:04    Post subject: Reply with quote

The issue is the second ? (questionmark). There can be only one in the url. You have to mask it.

http://someurl.com?next=https://play.google.com/store/apps/details?pepe=1 has the ? two time in it.

See also https://wiki.apache.org/httpd/RewriteQueryString for the pattern of the query

See also http://stackoverflow.com/questions/2252238/how-can-i-match-query-string-variables-with-mod-rewrite
Back to top


Reply to topic   Topic: match a query string with url as value View previous topic :: View next topic
Post new topic   Forum Index -> Apache