You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marcel Florian <ma...@googlemail.com> on 2015/11/09 11:24:14 UTC

[users@httpd] Get parameters at the end of URL on Apache Web Server

Hello guys,

I have a URL with the following syntax:

https://www.domain.com/pay/a1b2c
In the /pay directory I have a simple payment form. I am using JavaScript to get the URL appendix a1b2c and process it in order to get further data to display in the payment form:

var url = window.location.href;
var appendix = url.split("/").pop();
...
But if I open the URL in the browser, Apache says (of course):

Not Found
The requested URL /pay/a1b2c was not found on this server.
How can I solve this problem? Which Apache config do I need? 

Thank you! 

Best, Marcel

Re: [users@httpd] Get parameters at the end of URL on Apache Web Server

Posted by Daniel Gruno <hu...@apache.org>.
On 11/10/2015 08:40 AM, Marcel Florian wrote:
> Thank you Daniel, "AcceptPathInfo On” seems to be the right approach.
> Where can I set this on Apache?

Anywhere, really. You can set it in the virtual host stanza, in a
.htacess file, or globally.

With regards,
Daniel.

> 
> Best,
> 
> Marcel
> 
>> On 09 Nov 2015, at 11:27, Daniel Gruno <humbedooh@apache.org
>> <ma...@apache.org>> wrote:
>>
>> On 11/09/2015 11:24 AM, Marcel Florian wrote:
>>> Hello guys,
>>>
>>> I have a URL with the following syntax:
>>>
>>> |https://www.domain.com/pay/a1b2c <http://www.domain.com/pay/a1b2c>|
>>>
>>> In the |/pay| directory I have a simple payment form. I am using
>>> JavaScript to get the URL appendix |a1b2c| and process it in order to
>>> get further data to display in the payment form:
>>>
>>> |varurl =window.location.href;varappendix =url.split("/").pop();...|
>>>
>>> But if I open the URL in the browser, Apache says (of course):
>>>
>>> |NotFoundTherequested URL /pay/a1b2c was notfound on thisserver.|
>>>
>>> How can I solve this problem? Which Apache config do I need? 
>>>
>>> Thank you! 
>>>
>>> Best, Marcel
>>>
>>
>> Either use "AcceptPathInfo On" or use a rewrite rule to redirect to your
>> payment form. Or possibly redirect to /pay/?a1b2c and use
>> document.location.search.substr(1) to fetch the arguments in javascript.
>>
>> with regards,
>> Daniel.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> <ma...@httpd.apache.org>
>> For additional commands, e-mail: users-help@httpd.apache.org
>> <ma...@httpd.apache.org>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Get parameters at the end of URL on Apache Web Server

Posted by Marcel Florian <ma...@googlemail.com>.
Thank you Daniel, "AcceptPathInfo On” seems to be the right approach. Where can I set this on Apache?

Best,

Marcel

> On 09 Nov 2015, at 11:27, Daniel Gruno <hu...@apache.org> wrote:
> 
> On 11/09/2015 11:24 AM, Marcel Florian wrote:
>> Hello guys,
>> 
>> I have a URL with the following syntax:
>> 
>> |https://www.domain.com/pay/a1b2c <https://www.domain.com/pay/a1b2c> <http://www.domain.com/pay/a1b2c <http://www.domain.com/pay/a1b2c>>|
>> 
>> In the |/pay| directory I have a simple payment form. I am using
>> JavaScript to get the URL appendix |a1b2c| and process it in order to
>> get further data to display in the payment form:
>> 
>> |varurl =window.location.href;varappendix =url.split("/").pop();...|
>> 
>> But if I open the URL in the browser, Apache says (of course):
>> 
>> |NotFoundTherequested URL /pay/a1b2c was notfound on thisserver.|
>> 
>> How can I solve this problem? Which Apache config do I need? 
>> 
>> Thank you! 
>> 
>> Best, Marcel
>> 
> 
> Either use "AcceptPathInfo On" or use a rewrite rule to redirect to your
> payment form. Or possibly redirect to /pay/?a1b2c and use
> document.location.search.substr(1) to fetch the arguments in javascript.
> 
> with regards,
> Daniel.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org <ma...@httpd.apache.org>
> For additional commands, e-mail: users-help@httpd.apache.org <ma...@httpd.apache.org>

Re: [users@httpd] Get parameters at the end of URL on Apache Web Server

Posted by Daniel Gruno <hu...@apache.org>.
On 11/09/2015 11:24 AM, Marcel Florian wrote:
> Hello guys,
> 
> I have a URL with the following syntax:
> 
> |https://www.domain.com/pay/a1b2c <http://www.domain.com/pay/a1b2c>|
> 
> In the |/pay| directory I have a simple payment form. I am using
> JavaScript to get the URL appendix |a1b2c| and process it in order to
> get further data to display in the payment form:
> 
> |varurl =window.location.href;varappendix =url.split("/").pop();...|
> 
> But if I open the URL in the browser, Apache says (of course):
> 
> |NotFoundTherequested URL /pay/a1b2c was notfound on thisserver.|
> 
> How can I solve this problem? Which Apache config do I need? 
> 
> Thank you! 
> 
> Best, Marcel
> 

Either use "AcceptPathInfo On" or use a rewrite rule to redirect to your
payment form. Or possibly redirect to /pay/?a1b2c and use
document.location.search.substr(1) to fetch the arguments in javascript.

with regards,
Daniel.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org