0
Good morning, you guys.
The point is I can access an address dominio.com/modulo/id/titulo
and he rewrites to dominio.com/default.asp?link=artigo&id=123&titulo=teste
, but my question is whether I can do the reverse process, ie access dominio.com/default.asp?link=artigo&id=123&titulo=teste
and he change to dominio.com/modulo/id/titulo
.
Codes:
ASP
<!DOCTYPE html><html lang="pt-br"><head><meta charset="utf-8"/><title>Teste Isapi Rewrite</title></head><body><p>Teste!<br>link: <%=request("link")%><br>id: <%=request("id")%><br>teste: <%=request("teste")%><br></p></body></html>
WEB.CONFIG
<?xml version="1.0" encoding="UTF-8"?>
<system.webServer>
<rewrite>
<rules>
<rule name="artigo" stopProcessing="true">
<match url="^artigo/?([a-zA-Z0-9_-]+)?/?([a-zA-Z0-9_-]+)?/?([a-zA-Z0-9_-]+)?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="default.asp?link={R:0}&id={R:1}&teste={R:2}" />
</rule>
</rules>
</rewrite>
</system.webServer>
Thanks in advance!