Questions tagged [request-uri]

The Request-URI is a Uniform Resource Identifier to identify the resource upon which the request should be applied.

There are 4 types of options available for the request uri depending on the nature of the request -

  • "*" = request does not apply to a particular resource
  • absoluteURI = when the request is being made to a proxy
  • abs_path = to identify a resource on an origin server or gateway.
  • authority = only used by the CONNECT method
101 questions
70
votes
13 answers

Why is it that "No HTTP resource was found that matches the request URI" here?

I have code in my controller like so: [Route("api/deliveryitems/InsertIntoPPTData/{stringifiedRecord}")] ...and I'm calling it via Postman like so: …
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
7
votes
1 answer

filter_input() $_SERVER["REQUEST_URI"] with FILTER_SANITIZE_URL

I'm filtering $_SERVER["REQUEST_URI"] such that: $_request_uri = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL); As explained in php.net: FILTER_SANITIZE_URL Remove all characters except letters, digits and …
Kibele
  • 105
  • 1
  • 1
  • 8
4
votes
4 answers

PHP: Change URL parameter

This is what I have echo ''; I have 2 parameters in my url one is campaign, second is startrow, how can I just remove 'startrow' parameter and its…
Shujaat Shaikh
  • 189
  • 1
  • 5
  • 17
4
votes
2 answers

Apache 2.4: AuthType Basic and REQUEST_URI - Comparisons (with or without regular expr.) do not work properly

We use Apache 2.4.10 on a Debian Server. Requests are redirected from an Apache Proxy Server (same system and version) who acts as balancer (only the one balance member at the moment). The access to the related single virtual host is generally…
lsblsb
  • 1,292
  • 12
  • 19
3
votes
3 answers

How to use RewriteRule such that $_SERVER['REQUEST_URI'] is modified too for PHP?

With this .htaccess: RewriteEngine On RewriteRule foo/(.*) /foo-$1 # here I tried [L], [PT], [C], etc. RewriteRule . index.php [L] I've tried all possible flags for the first RewriteRule, but always, this PHP code:
Basj
  • 41,386
  • 99
  • 383
  • 673
3
votes
1 answer

Nginx - if $request_uri exists proxy_pass one url, otherwise another url

I want to handle 2 cases: test.example.com and test.example.com/ABC. If the entered url is the base domain (test.example.com), I want to proxy_pass a given endpoint (Let's say example.com/home). If test.example.com/ABC is given, I want to…
senty
  • 12,385
  • 28
  • 130
  • 260
3
votes
0 answers

Check if REQUEST_URI Does not contain a string

Our current setup redirects to a specific page if the requested file is pdf,xls,etc Now we want to add an exception to the rule to exclude files prepended with some specific text such as "FSP_" But my exceptions are not working. It works if I allow…
Kemystery
  • 31
  • 3
3
votes
2 answers

Got InvalidClientIdError (invalid_request) Mismatching redirect URI. using requests_oauthlib

I am trying to simulate token exchange between consumer and provider (server_to_server) using library requests_oauthlib. I getting error after I receive the code after authorization at provider side and exchanging the code for the token. So I get my…
3
votes
1 answer

How to remove folder from Request_URI in php and xampp?

I have url to index.php like this http://localhost/exercise/ When I call return var_dump( trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/') ); I have exercise project folder in xampp's htdocs. On url http://localhost/exercise/sd/ds I…
3
votes
1 answer

Request-URI Too Long in heroku nodejs

I am getting the following error when calling a REST API hosted on heroku, written in nodejs. I tried all the options mentioned here, but it looks like that issue is different and hence is not helping. I am using nodejs, expressjs, bodyparser. This…
Arun Das
  • 81
  • 6
3
votes
4 answers

Remove parent folder from $_SERVER['REQUEST_URI'];

I want to remove the first folder outputted by $_SERVER['REQUEST_URI']; // I use it as language switcher in my website, here's how it works:
Lucas Bustamante
  • 15,821
  • 7
  • 92
  • 86
2
votes
1 answer

.htaccess migrator from apache 2.2 to apache 2.4

Im trying to migrate my .htaccess file from apache 2.2 to apache 2.4, but i'm having a hard time recreating these deny/allow rules. #deny access to all files inside folders SetEnvIf Request_URI "^/.+\.[a-z]+$" deny SetEnvIf Request_URI…
2
votes
0 answers

concatenation of request url to web archive's base url when using fetch api

I want to run some script from the browser console for external sites that extracts the dom tree with some format, I did it right but when I wanted to write the result in my file system. this was not allowed due to security issues, so I wrote a…
2
votes
0 answers

Nginx, urls with trailing slash and query string break path parsing for query_string and request_uri

Im working on a Laravel app hosted via Nginx that is replacing an old system that ran on Apache 2.2. The new system must support all urls currently supported by the old system. Most urls are like this, and work…
Wesley Smith
  • 19,401
  • 22
  • 85
  • 133
2
votes
1 answer

How to get current URL and change parameter PHP

I have a URL like this: muliba/?i=page.alama&pro=as And I created a link like this: ">AS
barhea
  • 29
  • 4
1
2 3 4 5 6 7