Welcome! Log In Create A New Profile

Advanced

301 Moved Permanently ohne Slash am Ende

Posted by Maaax 
301 Moved Permanently ohne Slash am Ende
September 22, 2019 02:18AM
Hallo,

Ich möchte die POSTBACK URL von meinem Lieferanten nutzen um z.B den Bestand im Shop immer aktuell zu haben.

Vorgabe der URL : http://www.example.com/stock

Nun habe ich einen solchen Link erstellt.

Gebe ich den Link im Browser ein, wird die Seite aufgerufen. Ganz egal ob mit dem / (Slash) am Ende oder nicht.

Curl Ausgabe mit Slash am Ende :

Warning: Setting custom HTTP method to HEAD with -X/--request may not work the
Warning: way you want. Consider using -I/--head instead.
HTTP/1.1 200 OK
Server: nginx/1.14.0 (Ubuntu)
Date: Sun, 22 Sep 2019 06:12:44 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
Set-Cookie: PHPSESSID=3b3nm0vvhc7oso6oce8lhousmu; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache

Curl Ausgabe ohne / am Ende :

Warning: Setting custom HTTP method to HEAD with -X/--request may not work the
Warning: way you want. Consider using -I/--head instead.
HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.0 (Ubuntu)
Date: Sun, 22 Sep 2019 06:13:22 GMT
Content-Type: text/html
Content-Length: 194
Location: http://www.example.com/stock/
Connection: keep-alive

Blockkonfiguration :

server {
listen 80;
listen [::]:80;

root /var/www/example.com/html;
index index.php index.html index.htm index.nginx-debian.html;

server_name example.com www.example.com;

location / {
try_files $uri $uri/ =404;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}

Was muss ich tun damit die Blockkonfiguration erfolgreich ist ?

Vielen Dank im Voraus :)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 268
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready