rewrite Rule Help

Sep 25, 2008 at 10:19 AM
it's the first time that I try to use this kind of product but it seems to be great !
I have this problem I try to create a rule for rewrite the url but it doesn't work :

My url :,_scarica_i_video_da_più_di_50_risorse_online

I would like to transform it in :,_scarica_i_video_da_più_di_50_risorse_online.html

Here is what I put in my ini file :

RewriteLogLevel 5
RewriteLogFile c:\php\iirf\log.txt

RewriteRule /news-22481.php?$1 /$1.html

Any help is really apreciated !!!



Sep 26, 2008 at 10:21 AM
RewriteRule /news-22481\.php\?(.*) /$1.html
Oct 1, 2008 at 9:31 PM

Renato - I think maybe we have it backwards.

When you say "I want to transform" - it's not clear which URL will be activated on the browser, and which will be activated on the server.

Which is which?

Do you want the .php URL to be shown in the browser?  Then you should apply the rule offered by withtao.

But I think you want the .html URL in thre browser, and you want to RUN the .php script on the server. that is a different rule.

Try the TestDriver.exe tool, in the download.  It will help you to visualize what is happening.