Andrew S
2012-09-16 22:49:24 UTC
Hello cool people,
We had two web sites on the one server and the second web site has got so
big we need to move it to its own server.
So we setup the second web server and copied all the files to it, so
effectively the web site has moved from:
www.firstwebsite.com/subdirectory/index.html
to
www.newwebsite.com/index.html
- note that it is no longer in a sub directory.
So, going from the advice page:
http://httpd.apache.org/docs/2.4/rewrite/remapping.html
should I follow the "Resource Moved to Another Server" instructions?
Supposedly I have to edit a '.htaccess' file, but I don't know where it is
located on the server. Where should it be? In the default public_html or
www folder or in one of the server folders?
So I need to redirect 5 URLs. How do I do that? How about this:
(with htaccess on first server)
#With mod_rewrite
RewriteEngine on
RewriteRule ^/subdir/(.*) http://www.newwebsite.com/$1 [R,L]
Is that last bit correct? Is there anything else I need, like to do I need
to close that statement? Thanks a lot.
Cheers, Andrew
We had two web sites on the one server and the second web site has got so
big we need to move it to its own server.
So we setup the second web server and copied all the files to it, so
effectively the web site has moved from:
www.firstwebsite.com/subdirectory/index.html
to
www.newwebsite.com/index.html
- note that it is no longer in a sub directory.
So, going from the advice page:
http://httpd.apache.org/docs/2.4/rewrite/remapping.html
should I follow the "Resource Moved to Another Server" instructions?
Supposedly I have to edit a '.htaccess' file, but I don't know where it is
located on the server. Where should it be? In the default public_html or
www folder or in one of the server folders?
So I need to redirect 5 URLs. How do I do that? How about this:
(with htaccess on first server)
#With mod_rewrite
RewriteEngine on
RewriteRule ^/subdir/(.*) http://www.newwebsite.com/$1 [R,L]
Is that last bit correct? Is there anything else I need, like to do I need
to close that statement? Thanks a lot.
Cheers, Andrew