Using htaccess is possible to do
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^mercedita/?$ /sites/mercedita/efetuarlogin.asp [NC,L]
</IfModule>
So when there is /mercedita after .com.br the server will understand that it is the same thing as /sites/mercedita/efetuarlogin.Asp
Here you will be able to understand a little better about the operation
http://blog.thiagobelem.net/aprendendo-urls-amigaveis
For ASP IIS add the following code in your web.config
within the tag <system.webServer>
:
<rewrite>
<rules>
<rule name="renomelogin" stopProcessing="true">
<match url="^mercedita$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/sites/mercedita/efetuarlogin.asp" appendQueryString="true" />
</rule>
</rules>
</rewrite>
Note: If the person type mercedita/ the page will not be found, for this you should add one more rule(<rule>
) with a different name and change the line
<rule name="renome login com barra" stopProcessing="true">
<match url="^mercedita/$" ignoreCase="true" /> // Adicione a barra no final
Related: What are friendly Urls?
– Renan Gomes
This can be solved with a route structure, which can be done in several ways, depending on the technologies you are using.
– Hamurabi Araujo
I am programming this site in Asp. I saw something about a file . htaccess but I could not understand anything.
– Bruno Romualdo
Possible duplicate of How can I simplify Urls for a website?
– Wallace Maxters
Wallace, this link of yours works with apache and it doesn’t work on mine because it’s IIS. I will edit my question specifying this.
– Bruno Romualdo