2 Replies Latest reply: Aug 23, 2012 5:28 PM by desutton
YaLinguist Level 1 Level 1 (0 points)

I have an old server running OS X Server 10.4.10. There is one website hosted there, files located in /Library/WebServer/Documents. I need to move that site to a different server (before eventually shutting this one down).  The new site exists (at new.server/site/), and I tried to do the redirect by adding the file /Library/WebServer/Documents/.htaccess with the contents

Redirect 301 / http://new.server/site/

The old site isn't getting redirected, though. Have I put the .htaccess file in the wrong place? Does it have the worong syntax? Do I need to enable something to allow server-side redirection in this way (e.g., turn on some module in the web server via Server Admin)?

 

Thanks for any help.

 

--

 

Steve Anderson

  • 1. Re: How to redirect my 10.4 server's website?
    YaLinguist Level 1 Level 1 (0 points)

    Addendum: I tried to do this (on the basis of an old message) by adding a Redirect to the site (editing the only site shown in Server Admin, empty domain name, to add a URL Redirect (type: Redirect, Pattern: / Path: http://new.server/site/) and restarting the web server.  But now I can't connect to the site at all (connections return an error message "can't connect to the server old.server")! And going back in, deleting the redirect and restarting it again doesn't help: I still can't connect at all.

     

    I really need some help with these settings....

     

    --

     

    Steve Anderson

  • 2. Re: How to redirect my 10.4 server's website?
    desutton Level 1 Level 1 (0 points)

    YaLinguist,

     

    If your going to use .htaccess files then you need to edit you /etc/httpd/sites/<vhost>.conf file.

     

    You'll need to be root to access the file and look for the statement:

    AllowOverride None

     

    and change it to:

    AllowOverride All

    Then add somewhere near the top:

    AccessFileName .htaccess

    Save the file restart the Web service. Now your .htaccess files should work.