301 Movement Permanently

I changed my webadress from http to https. And now I get the notice of 301 movement permanently when opening the old mit apps. Where should I change what in the app inventor to get back the normal behaviour?

I use the mysql.php from Taifun and I adressed it via my Wordpress adress http://retslop-subdom5a.synology.me/wp-content/uploads/PHP_SQL-Tests/mysql_new.php
The change from http to https in the above adress does not solve the problem.

Thanks in advance for any hint...

This sounds like a DNS issue, check how your DNS is setup on your host.

Thank you TIM,

  • my host is a Synology DiskStation 218+

  • Servername = DiskStation3

  • Standard Gateway is the adress of my FritzBox-Router (LAN)

  • HTTP/2 is activated

  • Server Header in HTTP answers is deactivated

  • Hostname = retslop-subdom5a,synology.me

  • Heartbeat is activated

  • Router is configured for the WebStation with the ports 80/443 (the management service is 5000 and 5001)

  • HTTP-Backend Server = Apache HTTP-Server 2.4

  • PHP version 7.4 is used

  • In the WebStation I use 4 virtual hosts, one of them is "retslop-subdom5a,,,,": ports are 80/443 and 5000/5001 and HTTP/2 iand HSTS s checked

  • There are plenty checkboxes für configuring PHP. Most of them are checked

  • On this server is Wordpress installed.

  • I upload 2 versions of the .htaccess file//The test version did not solve my problem .htaccess_original.txt (553 Bytes) .htaccess_Test_neu.txt (675 Bytes)

  • I upload my config.php [REMOVED by jis for security reasons]

and I upload the used mysql.php
Upload_mysql_neu.txt (4.9 KB)

I very much hope, that somebody finds the error point....Thanx in advance


Are you accessing this server locally (not really any need for https if that is the case), or using a fully formed domain name address to do it (e.g. your diskstation is being served up to the internet with an https domain name?)

Have you tried accessing it from another network?

Thank you Tim,

  • I access the server locally, when I am administering it (with the Synology DSM= DiskStationManager)
  • I access the server via internet, when I am using several Android Apps which are using an MySQL database on my server (and there I get the message 301 Movement Permanently) The Smartphone uses WLAN or mobile phone network
  • I access the server via internet, when I am adressing a Website App, for example:
    https://retslop-subdom5a.synology.me/wp-content/uploads/PHP_SQL-Tests/Videos/db_select_videos.html (calling this URL, there is no Movement message!)


Hello everybody,
my problem is still unsolved: The access to a mysql-database is no longer working from my apps since I changed the domain from http to https. Meanwhile I could avoid the above mentioned error message (Error 301 Movement Permanently) by changing the URL variable from http to https. But there is still no response from my mysql database hosted on my server.
I think, that the solution should be found in the mysql.php (updated from Taifun and adopted by me):
//$servername = "localhost:/run/mysqld/mysqld10.sock"; falsch!
$servername = "localhost";
$username = "root";
$password = "1August2";
$dbname = "android";
$port = "3307";
$socket = "/run/mysqld/mysqld10.sock";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname, $port, $socket);// Check connection
if (!$conn) {
die("Die Verbindung hat nicht geklappt: " . mysqli_connect_error());
//echo "Die Verbindung war erfolgreich!";
//This code is something you set in the APP so random people cant use it.
***/ Rest of program is untouched

I changed the “http” in this php program into “https”, but was not successful. Perhaps Taifun has any idea??
Thank you in advance/opowoj

this returns "page not found"... therefore check your URL... a correct URL returns "Bad request"...


Hi Taifun,
thank you for your reply. Meanwhile I changed my Wordpress adress to "https://retslop-subdom5a.synology.me/wp-content/uploads/PHP_SQL-Tests/mysql_neu.php" and indeed, this URL returns "Bad request"... What does this mean?? The adress is correct....

But this does not solve my problem. Before I changed to https, the apps worked with http....
My test app does not report "Bad request". It just does not pick up foto from the database...


Which means, the URL is correct...
It returns Bad request if the URL is opened in a browser without providing a sql key.. see also the php script...


thank you Taifun.

I beg your pardon, but I don't know, how to open a URL in a browser with providing a sql key. I upload the structure of one of my mysql tables:

In the app blocks I refer to the field "num" which is a key. How shall a change my request? I upload the query block: runQuery with Num I use a URL only to define the adress for the php file. In this php file I defined a sqlkey (see above) in the config part.I use this key in the blocks, see upload: sqlkey replace

What do I wrong or what should I do further??


The php script is to be used by your app and not in a Browser... the Browser test is only to check, if the URL is correct... and Bad request means, it is correct... just continue with your tests in your app


Hi Taifun,
meanwhile I continued testing and finally with my simpliest app, I got the following error message:HathaYogaApp_Error_Variables_Block.pdf (1.1 MB) Do you see the wrong detail?

Addition: TABLEIDV3 has 2 fields: Num and Foto; Foto has the structure: https://retslop-subdom5a.synology.me/wp-content/uploads/HiSlider/Papa/YogaÜbungen/dataimages/Papas Yoga-Übungen_01

Thanks in advance/opowoj

My research meanwhile gets the following results:

I can locate my error 1103 by the following:

I hope, that these remarks give any hint for further testing suggestion.....


error 1103 unable to post or put

that error appears always or only sometimes?
for the latter see these threads

Thank you Taifun! That error appears always (but only in MITAI2 with sql access) See my last statements...

Is it possible, that my domain certificate makes the error?

It is issued
for "retslop-subdom5a.synology.me" and for "retslop-subdom5a.synology.me:443/5001"
(but the 2nd adress is not found!!)
and not for "retslop-subdom5a.synology.me/wp-content/uploads/PHP_SQL-Tests/"
(but I can open "retslop-subdom5a.synology.me/wp-content/uploads/PHP_SQL-Tests/Videos/db_select_videos.html" from an AI2 app, see the upload here acces of a html file with a AI2 app

I have no problem in adressing any PHP or HTML file from AI2 (see no 13) , i.e. to open a mysql database. If I continue in PHP, the Select operator works too. So it does not sound logic very much, to be a server problem....

I added "mysqli_set_charset($conn, "utf8");" before the connection statement. But no effect on the query...

Which sounds like a server issue then...
Probably your server is not able to accept Post requests anymore? You might want to ask your Web host support...


Hi Taifun,

the server is my own server (hosted on my Synology NAS called Webstation). It is able to accept Post requests from Windows with HTML and PHP, but no longer from AI2. Please see my remarks beginning with 9/18 from Jul 31.


sorry, I do not know the answer to your problem