Apache error when passing URL as argument

Hi everyone, Im really confusing this issue. I will try to describe this:

The problem is this: http://mydomain.com/somedir/somephp.php?arg1=value&arg2=http://otherdomain.com&arg3=http://othertoo.com/somepath/something ... completely fails. With url encoding and without it.

My site reads everything after mydomain.com/everything, except for the files and directories that exist. I do this with mod_rewrite:

Options -Indexes 

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ handler.php

The example request above is landing on handler.php. If I comment on the RewriteRule, an apache error will occur:

Forbidden

You don't have permission to access /somedir/somephp.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

With a lot of tests, etc., Ive found out that there is a problem with the http: // or: // line in the url arguments. But its appearance in url is encoded: S

openId, , , URL- url .

, alougth, . url .

, ! Thanx!

+3
2

.

. , .htaccess. .

URL- , -.

, , .

, .

+2

Source: https://habr.com/ru/post/1731405/


All Articles