0

What would the proper syntax be to redirect a URL in ISAPI Rewrite that's in a folder to the homepage? For example... /category/sub-category/file.html

I've tried numerous things, such as...

RewriteRule ^category/sub-category/file.html  / [NC,R=301,L]
RewriteRule ^category/sub-category/file.html  http://www.mysite.com/ [NC,R=301,L]
RewriteRule ^category/sub-category/file.html  http\://www.mysite\.com/ [NC,R=301,L]
RewriteRule ^category/sub-category/file\.html  / [NC,R=301,L]
RewriteRule ^category/sub-category\/file\.html  / [NC,R=301,L]
etc.

...but I can't seem to get anything to work!

1 Answers1

1

Make sure you have the following:

RewriteEngine on
RewriteBase /

RewriteRule ^category/sub-category/file\.html$  http://www.domain.com/ [NC,R=301,L]

If the above doesn't work, try to follow Helicon's FAQ (http://www.helicontech.com/forum/10648-FAQ.html) and make sure ISAPI_Rewrite is working at all. This is ISAPI_Rewrite3, right?

Andrew
  • 511
  • 3
  • 7