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?










share|improve this question






















  • 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















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?










share|improve this question






















  • 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













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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 the proxpass, 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










  • @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
















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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Full-time equivalent

さくらももこ

13 indicted, 8 arrested in Calif. drug cartel investigation