Site redirection error

Asked

Viewed 51 times

0

My website always redirects from www.idealnutri.com/magnesio-dimalato for www.idealnutri.com/magnesio-dimalato/ (WITH BAR AT THE END). Why?

How to know what is causing this redirection?

NOTE: I don’t have HTACCESS on my website.

  • What would be the drawback of the bar at the end?

  • When you do not put the file name in the url the browser searches the folder ( the last one in the url magnesio-dimalato ) by a ìndex.html fileou ``index.php or etc. (has an order of predominance). So the browser automatically puts the bar to reference the folder and then search for the predominant file.

  • @Leocaracciolo Do you have a negative opinion on this? rs

  • @dvd has yes, but because?

  • That’s right, just up in the comments. Help ai in the language of my reply here. Can edit!!!

  • Deyvison Silva, welcome back. Please read these posts: accept reply https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079 minimum example https://answall.com/help/mcve. and how to ask no questions https://pt.meta.stackoverflow.com/questions/5483/manual-manual-de-how-n%C3%83o-ask-questions/

Show 1 more comment

1 answer

2


When you do not put the file name in the url the browser searches the folder (the last in the url magnésio-dimalato) by a standard file index.html or index.php or default.php etc.. (has an order of predominance). So the browser automatically puts the bar to reference the folder and then search for the default file.

A simple online example accessing this link http://dominio.com/sos will see that the browser put the bar at the end and fetch by the file index.html. Therefore type http://dominio.com/sos or type http://dominio.com/sos/index.html or type http://dominio.com/sos/ leads to the same fate.

But if there is no default file inside the folder, a list will appear with all the files in the folder.

About URLS

url

The first part of a URL is the protocol, which tells a browser which Internet service should be used to download the document. A protocol is separated from the rest of the URL by two dots.

Examples of most commonly used protocols:

  • ftp - FTP servers are file deposits such as, documents, sounds, figures, computer programs etc..

  • mailto - indicates electronic mail transport.

  • http - get information from web servers. This is perhaps the most common protocol you will find when surfing the Web.

  • https - creates a connection to a secure web server, and then encrypts all page and information requests.

The second part, which appears to the right of the protocol, identifies the server on which the document is stored. Note that you have to separate the Web server protocol with two bars.

The third part defines the exact location of the document, that is, identifies the folders or subdirectories that contain the page or file. If a page or file is stored in the root folder of a server, its URL does not have a path.

The fourth part of a URL is the file name. If you do not include the specific file name, the browser looks for a default page and the order the server uses to search the page is as follows:

  • Windows 2003 -IIS 6 : index.htm, default.Asp, index.html, default.htm, index.shtml, index.wml, default.aspx, index.Asp, index.php.

  • Windows 2008 -IIS 7 : index.htm, index.html, default.htm, index.shtml, index.wml, default.aspx, index.Asp, index.php, default.php

  • Windows 2008 -IIS 8.5 : index.php, index.Asp, default.Asp, default.aspx, index.htm, index.html, default.htm, index.shtml

Example Windows 2008 -IIS 7

If inside the directory magnésio-dimalato there is a "default.Asp" page and also "index.htm", the server will display the "index.htm".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.