Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: mod_rewrite but for IIS?

  1. #1
    Join Date
    Oct 2005
    Location
    Manchester
    Posts
    155
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default mod_rewrite but for IIS?

    No idea what the correctly terminology is as I usually deal with Unix hosts, but is there such a feature available on RF hosting packages?

    Reason I ask is I want anyone visiting my "domain.com" redirected to "www.domain.com"

    Example:
    http://domain.com/dir/page.asp would redirect to:
    http://www.domain.com/dir/page.asp

    If there isn't such a feature on the server, I have come across this which seems to be free:

    http://www.iismods.com/url-rewrite/index.htm

    Would this be something RF would consider installing?

  2. #2
    Join Date
    Jan 2006
    Location
    Buckinghamshire
    Posts
    605
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by Reactivate
    No idea what the correctly terminology is as I usually deal with Unix hosts, but is there such a feature available on RF hosting packages?

    Reason I ask is I want anyone visiting my "domain.com" redirected to "www.domain.com"

    Example:
    http://domain.com/dir/page.asp would redirect to:
    http://www.domain.com/dir/page.asp
    Well, I think my main web site (here at RFH) does that anyway!
    Try http://ourpcman.com (or .co.uk or .biz or .net)

  3. #3
    Join Date
    Dec 2005
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It should do that anyway, just use domain aliases.

  4. #4
    Join Date
    Jun 2004
    Posts
    224
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Ourpcman
    Well, I think my main web site (here at RFH) does that anyway!
    Try http://ourpcman.com (or .co.uk or .biz or .net)

    all my sites work without the www. as well
    Mark

    MightyGroup.net
    www.MightyGroup.net

  5. #5
    Join Date
    Oct 2005
    Location
    Manchester
    Posts
    155
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Ourpcman
    Well, I think my main web site (here at RFH) does that anyway!
    Try http://ourpcman.com (or .co.uk or .biz or .net)
    When I visit http://ourpcman.com thats exactly what I get, I want it redirected to http://www.ourpcman.com for example.

    Otherwise Google et al will penalise me for having duplicate content on two websites as it treats them both seperately.

  6. #6
    Join Date
    Jun 2004
    Posts
    224
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Reactivate
    When I visit http://ourpcman.com thats exactly what I get, I want it redirected to http://www.ourpcman.com for example.

    Otherwise Google et al will penalise me for having duplicate content on two websites as it treats them both seperately.
    aaah right that makes more sense now.
    Mark

    MightyGroup.net
    www.MightyGroup.net

  7. #7
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    If you are really concerned about Google penalizing you. You would need to create a script for the default page that checks the URL entered, if it starts with a WWW then it's ok, go ahead and proceed, if not then redirect to the new site. An easy way of doing this is to use a non-standard default document and then just have a default document that does the redirection.

    An easy redirection would be the following ASP code:

    Code:
    <% Response.Redirect("http://www.somedomain.tld") %>
    A better edirection would be to write out 302 Permenantly Moved Headers.

    Hope this makes sense.

  8. #8
    Join Date
    Oct 2005
    Location
    Manchester
    Posts
    155
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Cheers for the advice Sol, wrote it, banged my head on the table, re-wrote it and added into global.asa so I don't have to edit a billion pages.

    Also, I used a 301 redirect as 302 is temporary iirc

    It's working well, as you can see:

    http://alltrampolines.com

  9. #9
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    Glad it worked out, and thanks for correcting me on the 301 / 302 code.

  10. #10
    Join Date
    Jan 2006
    Location
    Buckinghamshire
    Posts
    605
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by Reactivate
    Cheers for the advice Sol, wrote it, banged my head on the table, re-wrote it and added into global.asa so I don't have to edit a billion pages.

    Also, I used a 301 redirect as 302 is temporary iirc

    It's working well, as you can see:

    http://alltrampolines.com
    Er, are you sure?

    I'm not sure I totally get my head around this, but I THINK what you're saying is:
    1. You have one site, which responds with or without www before the name. Fine. Mine do that too, but I want that.
    2. The response shows the name requested in the browser as usual. You think Google doesn't like this as it considers this to be 2 sites (with and without www) with the same content. Personally I would think the people at Google would have figured that out and allowed for it, but maybe you have good reason?
    3. You have written some code that identifies the original URL requested and redirects to the same index page whether there's a www or not. A www appears in the users browser, and you presume Google is happier.

    I just tried going to your site and my experience was inconsitent without a www. I always got the same page content but sometimes I saw the www index page sometimes just the URL I typed (plus / at the end). Maybe it's down to caching?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Modification of IIS config by software
    By cswd in forum Development Support
    Replies: 2
    Last Post: 19th April 2006, 05:15 PM
  2. Add Domain 2 IIS
    By askjim in forum General Technical Support
    Replies: 7
    Last Post: 11th March 2006, 03:56 PM
  3. Global.asa and restarting IIS
    By terraqueotenaz in forum ASP (VBScript)
    Replies: 1
    Last Post: 8th August 2005, 05:58 AM
  4. php 5 + mysql 4.1 + IIS
    By terraqueotenaz in forum General Technical Support
    Replies: 3
    Last Post: 1st August 2005, 04:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •