A
A
Andrey Barbolin2020-08-10 21:44:29
Apache HTTP Server
Andrey Barbolin, 2020-08-10 21:44:29

How not to do The document has moved?

There is a simple php script test1.php

<?php
        echo "OK.";
?>

apache settings
Alias "/Service/Activation" "/var/www/html/service"

<Directory /var/www/html/service>
DirectoryIndex  test1.php
  Require all granted
</Directory>


When you go to url 10.11.10.11/Service/Activation apache2 responds with The document has moved and redirects adding "/" at the end of the line.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://10.11.10.11/Service/Activation/">here</a>.</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at 10.11.10.11 Port 80</address>
</body></html>


How to wean him from this redirect?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question