1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Redirect 301

Discussion in 'Plesk for Windows - 8.x and Older' started by CaseHost, Nov 27, 2008.

  1. CaseHost

    CaseHost Guest

    0
     
    Redirect 301 Hi,

    How make a redirect type 301?

    ex:

    blabla.mysite.com -> mysite.com
     
  2. wsani

    wsani Silver Pleskian

    28
    40%
    Joined:
    Mar 4, 2005
    Messages:
    509
    Likes Received:
    0
    Add to htaccess:

    RewriteBase /
    RewriteCond %{HTTP_HOST} ^blabla.mysite.com$ [NC]
    RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L]
     
  3. shall

    shall Regular Pleskian

    26
    57%
    Joined:
    Apr 2, 2007
    Messages:
    226
    Likes Received:
    0
    .htaccess won't work on Windows without an ISAPI module addon.

    If you setup the subdomains individually, you can use a default.asp file (or similar) to redirect with the following code:
    Code:
    <%
      Response.AddHeader "Location", "http://example.com/"
      Response.Status = "301 Moved Permanently"
    %>
    
    However, if you have several of these to do and you want to maintain the path and/or querystring, it's a LOT easier to create the subdomain site manually within IIS Admin, and use the following settings for the site:
    Create a new redirector site in IIS Admin with the subdomain alias. Right-click that redirector site in IIS Admin, select Properties, Home Directory, check "a redirect to a URL" and then check "a permanent redirection for this resource". Then set the following (using your own domain, of course):
    Redirect to: http://example.com$V$Q

    More about those here:
    http://support.microsoft.com/kb/313074
     
  4. wsani

    wsani Silver Pleskian

    28
    40%
    Joined:
    Mar 4, 2005
    Messages:
    509
    Likes Received:
    0
    Buy yourself isapi_rewrite and spare yourself the agony of having to do this with the deprecated ASP code...
     
  5. shall

    shall Regular Pleskian

    26
    57%
    Joined:
    Apr 2, 2007
    Messages:
    226
    Likes Received:
    0
    If it aint broke...
     
  6. wsani

    wsani Silver Pleskian

    28
    40%
    Joined:
    Mar 4, 2005
    Messages:
    509
    Likes Received:
    0
  7. shall

    shall Regular Pleskian

    26
    57%
    Joined:
    Apr 2, 2007
    Messages:
    226
    Likes Received:
    0
    I provided TWO solutions, solutions which didn't require the administrator to spend money on a third party product that would add complexity, memory overhead and another maintenance headache to the server.

    My point is that there's NO REASON at all to go out buying another product to replace functionality that IIS can do already. Sure, the ISAPI rewrite functions are "cool", but they're not necessary for the request from the OP.

    And I hardly consider two lines of code "agony" for a simple redirect.
     
  8. wsani

    wsani Silver Pleskian

    28
    40%
    Joined:
    Mar 4, 2005
    Messages:
    509
    Likes Received:
    0
    You’re comparing apples to oranges. I’d like to remind you that Linux is open-source, which means the development process doesn’t require you to drink the Microsoft Cool aid.

    Parallels as a company is already overwhelmed with their products. Adding a rewrite extension to their development would be detrimental. You should also consider that HeliconTech has been doing this for a long time, so why re-invent the wheel when they have already invented it? We all know that Parallels wouldn?t be able to create a better extension, so let?s not ask them to do this, okay?

    It seems that your problem is the cost, which is understandable. If that case I would recommend that you stop using Windows and use Linux instead…
     
  9. shall

    shall Regular Pleskian

    26
    57%
    Joined:
    Apr 2, 2007
    Messages:
    226
    Likes Received:
    0
    Will, it is apparent to me that maybe you don't understand English very well. If you did, you might have noticed that this is the WINDOWS support forum. Providing Linux solutions here is all but useless. Sure, there are "ways" to make them work, but they're absolutely unnecessary given that native solutions already exist.

    There's literally no way you could help me with this: it was NEVER my problem. The price was never a problem with me, either, since obviously I didn't ask the question, I provided options to the OP (Original Poster) that weren't going to affect performance on his machine or cost him UNNECESSARY money.

    I'm sure you feel you're doing someone a favor here by arguing with me about whether an ISAPI extension would be a better simple redirection solution to any of the native methods offered under Windows. You're not. In fact, you're wasting your own time and mine. And chances are you would have ended up costing the OP money and server performance.

    It seems that your problem is the language. Good luck with that.
     
  10. wsani

    wsani Silver Pleskian

    28
    40%
    Joined:
    Mar 4, 2005
    Messages:
    509
    Likes Received:
    0
    I'll call you Hal since I don't know your real name but thank you for using my real name.

    Wasting time? I don't think so. The choice to reply is up to you. If you don't want your time wasted, then don't reply. Just ignore me. Trust me, it has worked for a lot of other folks.

    I understood the question correctly. This is a Windows support forum and I've posted a link to a product that runs only in Windows, not Linux. I'm merely stating that nearly all products in Windows will be licensed, requiring you to pay for it. That includes Plesk, ISAPI_rewrite 3, etc.

    I'm not really arguing with you since I don't know you and I certainly don't have the desire to argue with you. I may debate a point but I that's far from arguing. If you want to argue with someone, do it with your significant other, pending that you have one. My posts aren't to single you out and you're absolutely right, I'm not going to win any brownie points with you. If you don't want to use isapi_rewrite, then don't. But please, don't tell me to stop posting.

    It seems that your problem is that you take replies too personally. Besides this a forum and in an effort to keep this thread in the classic forum context, everyone is entitled to their own opinion, no matter how backwards it may sound to you. Good luck with that, okay?
     
Loading...