How to extract parameter value in Apache httpd.conf in Location tag?
up vote
0
down vote
favorite
I'm looking to access the parameters of a URL in the <Location>
tag in Apache's httpd.conf file
The actual URL looks like this: https://website.com:1111/track?p=admin&s=875
I have the following code and 2 parameters in httpd.conf
file
<Location "/tracker/track?p=&s=">
ProxyPass "http://website.com:1111/track?p=&s="
ProxyPassReverse "http://website.com:1111/track?p=&s="
Order allow,deny
Allow from all
</Location>
I'm not sure what to put in front of the =
so that any value that comes in, gets passed on. Will a regex work here?
regex apache httpd.conf contextpath
add a comment |
up vote
0
down vote
favorite
I'm looking to access the parameters of a URL in the <Location>
tag in Apache's httpd.conf file
The actual URL looks like this: https://website.com:1111/track?p=admin&s=875
I have the following code and 2 parameters in httpd.conf
file
<Location "/tracker/track?p=&s=">
ProxyPass "http://website.com:1111/track?p=&s="
ProxyPassReverse "http://website.com:1111/track?p=&s="
Order allow,deny
Allow from all
</Location>
I'm not sure what to put in front of the =
so that any value that comes in, gets passed on. Will a regex work here?
regex apache httpd.conf contextpath
You can write a regex something like https?.*p=(w+)&s=(d+) and capture group1 and group2 content
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:20
@Pushpesh how do I capture the content, can yo give me an example?
– Jaskaran Singh Puri
Nov 10 at 19:25
Do you have more links on the file? or something similar which access the same parameters? Example here: regex101.com/r/xyA1f5/1, group 1 and group 2 contains which you need.
– lucas_7_94
Nov 10 at 19:27
@JaskaranSinghPuri: What language/script you are using? You will need to write some code using regex and will get the expected output.
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:29
@lucas_7_94 the regex will only solve the pattern problem. my main concern is how do the values get passed in the location tag i. e. To theproxpass
, do I put the regex there also and it automatically takes the param values?
– Jaskaran Singh Puri
Nov 11 at 6:16
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm looking to access the parameters of a URL in the <Location>
tag in Apache's httpd.conf file
The actual URL looks like this: https://website.com:1111/track?p=admin&s=875
I have the following code and 2 parameters in httpd.conf
file
<Location "/tracker/track?p=&s=">
ProxyPass "http://website.com:1111/track?p=&s="
ProxyPassReverse "http://website.com:1111/track?p=&s="
Order allow,deny
Allow from all
</Location>
I'm not sure what to put in front of the =
so that any value that comes in, gets passed on. Will a regex work here?
regex apache httpd.conf contextpath
I'm looking to access the parameters of a URL in the <Location>
tag in Apache's httpd.conf file
The actual URL looks like this: https://website.com:1111/track?p=admin&s=875
I have the following code and 2 parameters in httpd.conf
file
<Location "/tracker/track?p=&s=">
ProxyPass "http://website.com:1111/track?p=&s="
ProxyPassReverse "http://website.com:1111/track?p=&s="
Order allow,deny
Allow from all
</Location>
I'm not sure what to put in front of the =
so that any value that comes in, gets passed on. Will a regex work here?
regex apache httpd.conf contextpath
regex apache httpd.conf contextpath
asked Nov 10 at 19:13
Jaskaran Singh Puri
189315
189315
You can write a regex something like https?.*p=(w+)&s=(d+) and capture group1 and group2 content
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:20
@Pushpesh how do I capture the content, can yo give me an example?
– Jaskaran Singh Puri
Nov 10 at 19:25
Do you have more links on the file? or something similar which access the same parameters? Example here: regex101.com/r/xyA1f5/1, group 1 and group 2 contains which you need.
– lucas_7_94
Nov 10 at 19:27
@JaskaranSinghPuri: What language/script you are using? You will need to write some code using regex and will get the expected output.
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:29
@lucas_7_94 the regex will only solve the pattern problem. my main concern is how do the values get passed in the location tag i. e. To theproxpass
, do I put the regex there also and it automatically takes the param values?
– Jaskaran Singh Puri
Nov 11 at 6:16
add a comment |
You can write a regex something like https?.*p=(w+)&s=(d+) and capture group1 and group2 content
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:20
@Pushpesh how do I capture the content, can yo give me an example?
– Jaskaran Singh Puri
Nov 10 at 19:25
Do you have more links on the file? or something similar which access the same parameters? Example here: regex101.com/r/xyA1f5/1, group 1 and group 2 contains which you need.
– lucas_7_94
Nov 10 at 19:27
@JaskaranSinghPuri: What language/script you are using? You will need to write some code using regex and will get the expected output.
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:29
@lucas_7_94 the regex will only solve the pattern problem. my main concern is how do the values get passed in the location tag i. e. To theproxpass
, do I put the regex there also and it automatically takes the param values?
– Jaskaran Singh Puri
Nov 11 at 6:16
You can write a regex something like https?.*p=(w+)&s=(d+) and capture group1 and group2 content
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:20
You can write a regex something like https?.*p=(w+)&s=(d+) and capture group1 and group2 content
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:20
@Pushpesh how do I capture the content, can yo give me an example?
– Jaskaran Singh Puri
Nov 10 at 19:25
@Pushpesh how do I capture the content, can yo give me an example?
– Jaskaran Singh Puri
Nov 10 at 19:25
Do you have more links on the file? or something similar which access the same parameters? Example here: regex101.com/r/xyA1f5/1, group 1 and group 2 contains which you need.
– lucas_7_94
Nov 10 at 19:27
Do you have more links on the file? or something similar which access the same parameters? Example here: regex101.com/r/xyA1f5/1, group 1 and group 2 contains which you need.
– lucas_7_94
Nov 10 at 19:27
@JaskaranSinghPuri: What language/script you are using? You will need to write some code using regex and will get the expected output.
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:29
@JaskaranSinghPuri: What language/script you are using? You will need to write some code using regex and will get the expected output.
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:29
@lucas_7_94 the regex will only solve the pattern problem. my main concern is how do the values get passed in the location tag i. e. To the
proxpass
, do I put the regex there also and it automatically takes the param values?– Jaskaran Singh Puri
Nov 11 at 6:16
@lucas_7_94 the regex will only solve the pattern problem. my main concern is how do the values get passed in the location tag i. e. To the
proxpass
, do I put the regex there also and it automatically takes the param values?– Jaskaran Singh Puri
Nov 11 at 6:16
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242513%2fhow-to-extract-parameter-value-in-apache-httpd-conf-in-location-tag%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can write a regex something like https?.*p=(w+)&s=(d+) and capture group1 and group2 content
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:20
@Pushpesh how do I capture the content, can yo give me an example?
– Jaskaran Singh Puri
Nov 10 at 19:25
Do you have more links on the file? or something similar which access the same parameters? Example here: regex101.com/r/xyA1f5/1, group 1 and group 2 contains which you need.
– lucas_7_94
Nov 10 at 19:27
@JaskaranSinghPuri: What language/script you are using? You will need to write some code using regex and will get the expected output.
– Pushpesh Kumar Rajwanshi
Nov 10 at 19:29
@lucas_7_94 the regex will only solve the pattern problem. my main concern is how do the values get passed in the location tag i. e. To the
proxpass
, do I put the regex there also and it automatically takes the param values?– Jaskaran Singh Puri
Nov 11 at 6:16