Page 1 of 1

URL Rewriting Problem Using ISAPI_Rewrite 2

Posted: Sun Jul 25, 2010 9:01 pm
by douglasrj21
Hello everyone!
I was researching the web about php and found this forum right now.
I'm glad to find so much helpful content in one place. :)
Sorry if I'm posting on the wrong place...

I'm working on this code for about 3 days... this might be very simple for experienced users, but this is not in my case. :o
The Host company uses ISAPI_Rewrite 2 with IIS 6.
This is the code on the httpd.ini file. I explained the problem as a comment, look:

[ISAPI_Rewrite]
#abstract www
RewriteCond Host: http\://www.jogosdemario.org
RewriteRule (.*) http\://jogosdemario.org\/ [RP,L]

RewriteCond Host: www.jogosdemario.org
RewriteRule (.*) http\://jogosdemario.org\/ [RP,L]

#Abstract .php extension and add a slash
RewriteRule ^/(.*)\.php$ \/$1\/ [RP,L]

#Put a slash at the end of the url if it's absent
RewriteRule ^/(.*)\> \/$1\/ [RP,L]

#This is what DOESN'T work... For example if user accesses: http://jogosdemario.org/sonic-moto/,
#it keeps the URL on the Adress Bar (that's ok), but is giving the errors "The parameter is incorrect. "
#and "Redirecting Error" instead of showing the real page file at http://jogosdemario.org/sonic-moto.php
RewriteRule ^/(.*)\/$ \/(.*)\.php [L]

Could someone give me a hand please??
I thank you in advance!
Greetings for everyone.