iis 7 - Converting mod_rewrite Rules to IIS Rewrite Rules -


I'm using to build my website, and in this The Htaccess mod_rewrite rules include, but I myself have been hosting my website on Windows Server using IIS, so I was trying to import the existing .htaccess rules in the IIS Recruitment module, but the rules that were imported Were not working properly

Would like to rewrite the URLs example:

  http://example.org.uk/about/ http://example.org.uk/about/about Rewrite on html ----- http://example.org.uk/blog/events.html ----------- http: // http://example.org.uk/blog/ Http: http://example.org.uk/blog/2010/11/foo-bar http://release.re/http://www.example.org.uk/blog/2010/11 to events / rewrites /foo-bar.html  

Rewrite> directories and file names are common and any values ​​can be used. I use a copy of .htaccess with Apache.

  #RERETEzine on #RRTteBase # Remove #RemoveRRCrint% {HTTP_HOST} ^ www from URL #. (. *) $ [Nc] #Revrett Raul ^ (. *) $ Http: //% 1 / $ 1 [R = 301, L] ### Revive Reserved Rules #### Rewrite% {REQUEST_FILENAME} /index.html - F. Revivalable ^ (. *) $ 1 / index.html #### And Generated Rewrite Rules #### # Listed Pages whose names are revised by their affiliate folder% {REQUEST_FILENAME} / $ 1.html - The same as f, rewrite rule ^ ([^ /] *) / $% {REQUEST_FILENAME} / $ 1.html # regular pages rewrite angle% {REQUEST_FILENAME} .html -f rewriting rule ^. * $% {REQUEST_FILENAME} HTML # Set up our custom 404 page error document 404/404 Html  

I have tried many ISAPI rewrite modules but they have not been successful, so I have the rules in the original IIS rewrite rules Would like to change

EDIT:

I have resolved 2/3 rules, it is only that I can not seem to work.

  & lt; Rule name = "imported rule 1" stopping = processing "wrong" & gt; & Lt; Mail url = "^ ([^ /] +) / $" Ignore = "False" /> & Lt; Conditions rational group = "matching all" track alps = "false" & gt; & Lt; Input = "{R: 0} / {R: 1} .HTML" matchType = "isfile" /> Add & Lt; / Status & gt; & Lt; Action type = "rewrite" url = "{R: 0} / {R: 1} .HTML" /> & Lt; / Rules & gt;  

is about mapping / about.html about about / , it is currently showing the directory listing .

I always try to avoid such situations, so I just use the URL rewrite which I Apache allows to paste the rules because they are using IIS, it will be ISAPI_Rewrite 3 (Lite version is free), or which is also free for 3 or fewer websites, since you never had such a headache .


Comments