How to prevent apache from redirect to php.index
<p>I use an php script for sms sending.
I have migrated service from CentOS 5 to CentOS 7, and now i have a problem when trying to get to example.com/sms/smsreceive.php.
Apache redirects for index.php. How could i prevent it? It seems to happen only for curl or wget. For requests launched from browser it works fine.
It's only my assumption that it has something to do with HTTP version.
I use CentOS7, php-5.4.16, Apache 2.4.6
On old Apache 2.2 the problem did not exist.</p>

<p><strong>Correct response</strong> (from browser) - apache access.log:</p>

<pre><code>10.0.0.2 - - [20/Mar/2016:09:08:49 +0100] "GET /sms/smsreceive.php HTTP/1.1" 200 883
</code></pre>

<p><strong>Incorrect response</strong> (from wget or curl) - apache access.log:</p>

<pre><code>10.0.0.3 - - [20/Mar/2016:09:08:23 +0100] "GET /sms/smsreceive.php HTTP/1.0" 302 -
</code></pre>

<p>This is what i get while trying to get it from wget:</p>

<pre><code>wget --delete-after http://host.example.com/sms/smsreceive.php
--2016-03-20 10:28:11--  http://host.example.com/sms/smsreceive.php
Resolving host.example.com... 1.2.3.4
Connecting to host.example.com|1.2.3.4|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: index.php [following]
--2016-03-20 10:28:11--  http://host.example.com/sms/index.php
Reusing existing connection to host.example.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 1501 (1.5K) [text/html]
Saving to: `index.php'
</code></pre>

<p>But when i request info.php, it works fine without redirection:</p>

<pre><code>wget --delete-after http://host.example.com/sms/info.php
--2016-03-20 10:50:12--  http://host.example.com/sms/info.php
Resolving host.example.com... 1.2.3.4
Connecting to host.example.com|1.2.3.4|:80... connected.
HTTP request sent, awaiting respon## Heading ##se... 200 OK
Length: unspecified [text/html]
Saving to: `info.php'
</code></pre>

<p>What could cause the 302 redirection, and how to prevent Apache from redirecting for all requests?</p>

<p>Right now the script doesn't work for linux servers attempting to use it.</p>

<p>Thanks a lot for Help!</p>