Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My company has a promotion in a magazine that was created before we implemented our new site. Since the release of the new site we use a inbound rewrite rule to redirect anything with a www. This advertisement however is http://www.openeye.net/2011rspromo/ so when a user visits it it redirects back to the homepage.

I need it to redirect to http://openeye.net/promotions/reportstar-free-cm-610/ instead and can't seem to find the right combination in URL Rewrites to get it to work.

Any help would be appreciated.

Default www redirect enter image description here

What I'm trying to do enter image description here

share|improve this question
add comment

3 Answers

It is a better approach to this issue to register an additional www.openeye.net as an additional host header for the openeye.net site.

You can do this in IIS7 by right-clicking the site and selecting Edit Bindings. There should be one default binding such as

 Type        Host Name        Port        IP Address
 http        openeye.net       80         00.00.00.000*

*This should be either the IP of your server or "All Unassigned".

Click Add, then enter a new binding with all of the same information, except that the Host name should read "www.openeye.net" instead of "openeye.net". When you are done your binding will look like:

 Type        Host Name        Port        IP Address
 http        openeye.net       80         00.00.00.000
 http        www.openeye.net   80         00.00.00.000

Please note that this will not actually redirect the request for http://www.openeye.net/2011rspromo/ to http://openeye.net/2011rspromo/, but will bind any such requests to the intended location. So, both URLs will resolve to the same resource.

share|improve this answer
    
Thank you for the help. –  Zach Shallbetter Jun 22 '11 at 17:37
add comment

smartcaveman is correct, but you don't want both openeye.net and www.openeye.net to both work (for SEO purposes).

So, make sure you trigger the Canonical domain name rule as well. Again, you'll need all the host names in the bindings as smartcaveman detailed above.

share|improve this answer
    
I think that was my original thought but it seems to conflict with other 301 redirects that I need to pull off. –  Zach Shallbetter Jun 22 '11 at 18:22
    
+1, I don't know how severe the SEO implications are of both working are. @James Skemp, do you have any documentation for this? @Zach Schallbetter, This article explains how to specify a canonical domain name rule –  smartcaveman Jun 23 '11 at 1:04
    
@smartcaveman Thanks. Google includes the ability to specify a canonical domain via their Webmaster tools, so I'd assume there's something of one. It's been a while, so I don't quite remember how Page Rank works, if you have externals links pointing to different domains on your site that might still be impacted. I think Matt Cutts' article - mattcutts.com/blog/seo-advice-url-canonicalization - is still relevant today, despite being from 2006. A search for 'canonical domains' also returns a number of relevant results. As a rule, I've just gotten into the habit of doing this. –  James Skemp Jun 23 '11 at 12:11
    
Sorry, unless you were talking about enabling a canonical domain using URL Rewrite (I assumed not, but just in case ...). That's found under the SEO heading, as Canonical domain name, and requires you to add each Web site domain as a binding to the site (that you want to redirect). This also helps simplify (www.)domain.(com|net|org) issues. –  James Skemp Jun 23 '11 at 12:15
add comment

You're close. Add both sites www.openeye.net and openeye.net to the bindings then follow these steps.

  1. Open URL rewrite
  2. Click add rule
  3. Click Blank rule
  4. Name = call it whatever you want.
  5. Requested URL: = Matches the pattern
  6. Using: = Wildcards
  7. Pattern: = *
  8. Ignore case is checked by default
  9. Add conditions
  10. Logical Grouping: Match All
  11. Input = {HTTP_HOST}
  12. Type = Does Not Match the Pattren
  13. Pattern = openeye.net
  14. Leave Server variables alone
  15. Action = Redirect
  16. Action Properties = http://openeye.net/{R:1}
  17. Redirect type: Permanent (301)
  18. Click apply
share|improve this answer
    
Is this not the answer you were looking for? –  Tatas Jun 23 '11 at 21:20
    
It seems as thought that's going to rewrite/redirect anything after openeye.net. That causes a number of problems since the site structure is completely different. –  Zach Shallbetter Jul 5 '11 at 21:09
    
Yes with the site structure being different it's not going to work. I must have missed that. You'll want to stay with what you're doing in the example above. Have you tried changing the order of the rewrite rules? What happens when you hit the www. link? Does it just remove the www. and keep the same site structure? –  Tatas Jul 6 '11 at 17:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.