Jump to content
Fórum Script Brasil
  • 0

URL Rewrite web.config


marcuspaulomm

Question

Olá.

Localmente eu usava o ISAPI Rewriter para fazer minhas 'urls rewrites'...

ex1: RewriteRule ^/[Pp][Pp]/[ss]ite/[Aa]lbuns/([a-zA-Z0-9_-]+)-([0-9]+)(.pp)$ /PP/site/DetalheAlbum.asp?AlbumID=$2

ex2: RewriteRule ^/[Pp][Pp]/[ss]ite/[Aa]dmin/[Oo]peradores/[Dd]esativar[Aa]tivar[Oo]perador/[?][Oo]peradorID=([0-9]+)[&]Ativar=([0-9]+)$ /PP/site/Admin/Operadores/DesativarAtivarOperador.asp?OperadorID=$1&Ativar=$2

Na minha hospedagem estou tendo que passar tudo pro web.config... só que essa linha ai tá dando erro, atualmente estou tentando:

ex1:

<rule name="DetalheAlbum" stopProcessing="false">

<match url="^albuns/([a-zA-Z0-9_-]+)-([0-9]+)(.pp)$" />

<action type="Rewrite" url="DetalheAlbum.asp?AlbumID={R:2}" />

</rule>

ex2:

<rule name="DesativarAtivarOperadorAdmin" stopProcessing="false">

<match url="^Admin/Operadores/DesativarAtivarOperador?OperadorID=([0-9]+)&amp;Ativar=([0-9]+)$" />

<action type="Rewrite" url="Admin/Operadores/DesativarAtivarOperador.asp?OperadorID={R:1}&amp;Ativar={R:2}" />

</rule>

O 1º Exemplo está funcionando, o 2º Não, o que há de errado ?

Valeu pela força. Abraço a todos!

:wacko:

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652.1k
×
×
  • Create New...