ISAPI Redirect 3 Filter 301 Redirect with subdomain
user5110 Published in September 19, 2018, 11:37 am
I'm very new in terms of writing rules for ISAPI Rewrite 3 from Helicon (licensed version) to be used for IIS6. I need to write 90+ rules for different pages from "subdomain.domain.com" to "www.domain.com", and I'm not very familiar with RegEx patterns. Unfortunately, these sites don't mirror, so doing a simple query string append won't work.
Example: Redirect "http://subdomain.domain.com/products/product.aspx?id=42" to "http://www.domain.com/productgroup/productinfo"
I have a pretty good start on it, however the furthest I've gotten is to get a specific page redirect to work. I need to get it down to the specific ID for some of these pages to redirect differently. Currently, the code I have for the web page redirect to Google (just for testing purposes) is
# Helicon ISAPI_Rewrite configuration file
# Version 22.214.171.124
RewriteRule ^(subfolder.html)/?(.*)$ http://www.google.com/ [NC,R=301,L]
NOTE: I just created a simple website with the following pages:
According to the previous code, "/subfolder/subfolder.html" redirects to Google and the others show the page normally. For testing purposes, I've been trying to append "id=1" to redirect to YouTube and "id=2" to redirect to Facebook, and neither of those are working at the moment. The code for that is