Does the IIRF change the URLs automatically?

Topics: User Forum
Aug 8, 2007 at 5:55 AM
I'm having some trouble here. Is the URL converted automatically or does it need to be "called" with any function. I have the following code:
RewriteRule ^/loja\/(0-9)(/a-zA-Z0-9_-)?(.html)?$ /loja.asp?id=$1&nome=$2

But when i try to reach, for example http://www.emfriburgo.com/loja.asp?id=21 it simply doesn't work and the URL stays this way.

I'd like it to be rewritten to this way http://www.emfriburgo.com/loja/21/loja.html

thank you
Aug 8, 2007 at 10:21 PM
I discovered that yes. Because it does not function:

RewriteRule ^/produto\/(0-9)(/a-zA-Z0-9_-)?(.html)?$ /produto.asp?id=$1&prod=$2&cat=$3&subcat=$4

http://emfriburgo.com/produto/21/17/7/9/Chale-no-Cnego-com-3-quartos-e-um-bela-vista

http://www.emfriburgo.com/produto.asp?id=21&prod=17&cat=7&subcat=9

What I am making made a mistake?

thank you
Aug 9, 2007 at 8:40 PM
Rewrite != Redirect

The way it works is you display the link http://www.emfriburgo.com/loja/21/loja.html in your output, so that the user sees that first and clicks on it.

Then IIRF takes the http://www.emfriburgo.com/loja/21/loja.html and changes it to http://www.emfriburgo.com/loja.asp?id=21 so your backend script processes it like a normal dynamic URL.
Aug 9, 2007 at 9:28 PM
Ok

thank you
Coordinator
Aug 20, 2007 at 7:32 PM
Quite right, Rewrite is not the same as Redirect.

I'd like to Point out that IIRF is primarily intended as a Rewrite filter, but it does perform 302 Redirects.
The support for Redirects is not as broad, though.

check the readme for more.