.htaccess addon domains

Discussion in 'Apache' started by blueuniverse, Oct 11, 2004.

  1. #1
    blueuniverse, Oct 11, 2004 IP
  2. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hope this helps:

    301 Redirect
    301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It's not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it's the safest option. The code "301" is interpreted as "moved permanently".

    You can Test your redirection with Search Engine Friendly Redirect Checker

    Below are a Couple of methods to implement URL Redirection



    How to Redirect in PHP
    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.new-url.com" );
    ?>


    How to Redirect in ASP
    <%@ Language=VBScript %>
    <%
    Response.Status="301 Moved Permanently" Response.AddHeader "Location", " http://www.new-url.com"
    >


    How to Redirect in ASP .NET
    <script runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
    Response.Status = "301 Moved Permanently";
    Response.AddHeader("Location","http://www.new-url.com");
    }
    </script>


    How to Redirect in ColdFusion
    <.cfheader statuscode="301" statustext="Moved permanently">
    <.cfheader name="Location" value="http://www.new-url.com">


    How to Redirect with htaccess
    Create a .htaccess file (if does not exists) in your root directory.
    Redirect permanent / http://www.new-url.com
     
    Spyware Remover, Oct 11, 2004 IP
  3. blueuniverse

    blueuniverse Guest

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Meant 301, sorry about that. Would .htaccess have any complications because of the addon domains and subdirectories?
     
    blueuniverse, Oct 11, 2004 IP
  4. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You would have to try it out and see. I would think it would NOT have any complications because the .htaccess file is just a file of indivdual commands.

    AJ
     
    Spyware Remover, Oct 11, 2004 IP
  5. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    TwisterMc, Oct 11, 2004 IP
  6. blueuniverse

    blueuniverse Guest

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Because, I already have a few links that went there, from when I was asking for reviews in the dev stages, and I get about 5 or so uniques a day from it now. :S

    I suppose it will die out eventually, but for now, this will be the solution.
     
    blueuniverse, Oct 12, 2004 IP
  7. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    did it work? I'm very interested.
     
    TwisterMc, Oct 12, 2004 IP
  8. blueuniverse

    blueuniverse Guest

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I get the error, redirection limit for this url exceeded when attempting to go to the address of the addon domain.
     
    blueuniverse, Oct 12, 2004 IP
  9. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #9
    it's looping. Might wanna contact your host and see if they have any ideas.
     
    TwisterMc, Oct 13, 2004 IP
  10. blueuniverse

    blueuniverse Guest

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yeah I know. I will try and contact my host about it.
     
    blueuniverse, Oct 13, 2004 IP
  11. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Keep me informed though. That's a good issue.
     
    TwisterMc, Oct 13, 2004 IP
  12. blueuniverse

    blueuniverse Guest

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    It is, seems like there is no solution though. I've asked my host now, and they said that there isn't one.

    If anybody does find a solution, I'd be very grateful to hear it.
     
    blueuniverse, Oct 14, 2004 IP
  13. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I'll ask around.
     
    TwisterMc, Oct 14, 2004 IP
  14. blueuniverse

    blueuniverse Guest

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Thanks, I will too
     
    blueuniverse, Oct 15, 2004 IP
  15. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I never found an answer, did you? Now I wanna do this too and I'm not sure how. ;)
     
    TwisterMc, Nov 24, 2004 IP
  16. blueuniverse

    blueuniverse Guest

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #16
    No, fraid not. Did ask, but I never got any answers that worked, all of them made it just bounce between the addon domain and the actual domain until it got confused and gave up.
     
    blueuniverse, Nov 24, 2004 IP
  17. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Yea I get that to. I'll end up creating a new directory and copying the files in there. :rolleyes: It works at least.
     
    TwisterMc, Nov 24, 2004 IP
  18. mr_inisibile

    mr_inisibile Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    mr_inisibile, Jul 28, 2008 IP