Single moved file and www prefix

Topics: User Forum
Jun 25, 2009 at 8:13 AM

Hello I'm new to Ionics Isapi filter and I'm having some small issues that I can't figure out.

First of all Ionics Isapi filter works proper, is installed proper but what I need to do with it doesn't really work that much
I need to adapt the .htaccess rule Redirect 301 /d/file.html http://www.myhost.com/r/file.html and of course the www prefix in case like http://myhost.com/support.html

RewriteLogLevel 3

RewriteCond %{HTTP_HOST} ^myhost.com$
RewriteRule ^/(.*)$ http://www.myhost.com/$1 [R]
RedirectRule /d/file.html http://www.myhost.com/r/file.html [I,L]


Can any of you guys help out?

Coordinator
Jun 25, 2009 at 5:36 PM

I don't really understand the question, especially the part that reads "of course the www prefix in case like <foo>". 

But here is a suggestion.

RewriteLogLevel 3

# redirect all requests to "myhost.com" to "www.myhost.com"
# and use HTTP return code = 301, "Moved Permanently"
RewriteCond  %{HTTP_HOST}    ^myhost\.com$
RedirectRule ^/(.*)$         http://www.myhost.com/$1    [R=301]

# For any request that comes in for the D directory, rewrite to the R directory
RewriteRule ^/d/(.+).html$   /r/$1.html                  [I,L]

Maybe that will get you moving.