Question : ISAPI Rewrite Rule help needed

Hi All,

I want to redirect all *.html requests for a URL www.MyDomain.com/forum to www.MyDomain.com/forum/index.php and anything above the forum folder is made into a URL variable called 'page'.


e.g.  

www.MyDomain.com/forum/01-test-name.html
redirects to
www.MyDomain.com/forum/index.php?page=01-test-name.html


I made the code attached from the documentation manual (http://www.isapirewrite.com/docs/), but it doesn't work.


any suggstions?
Code Snippet:
1:
2:
RewriteCond Host: www.MyDomain.com/forum
RewriteRule ^([^.]+)\.html$ /index.php?page=$1 [L]
Open in New Window Select All

Answer : ISAPI Rewrite Rule help needed

The condition checking the host should match only the host, not the path.

My suggestion would be
1:
2:
3:
4:
[ISAPI_Rewrite]
# do you need the host check?
RewriteCond Host: www\.MyDomain\.com
RewriteRule ^/forum/([^.]+)\.html$ /index.php?page=$1 [L]
Open in New Window Select All
Random Solutions  
 
programming4us programming4us