Page 1 of 1

Redirecting web access requests

Posted: Tue May 22, 2018 9:52 am
by ronks
Most of my web files are presently stored at
sonic.net/~ronks/
I recently got a domain name of
ronksville.com
through Sonic, and the home page is stored there too:
http://www.ronksville.com/index.html

Rather than move all my files within Sonic, I would like to just redirect ronksville requests to the corresponding file on ~ronks; for example
http://www.ronksville.com/aaa/bbb/filename.filetype
to
http://www.sonic.net/~ronks/aaa/bbb/filename.filetype

I've tried to create an .htaccess file in several ways and put it in the top-level ronksville directory, but none of these commands have worked:
redirect "/ronksville.com/" "http://sonic.net/~ronks/"
redirect 301 /old/ronksville.com/ http://sonic.net/~ronks/
redirect "/ronksville.com/index.html" "http://sonic.net/~ronks/index.html"

What am I missing here? I studied the Sonic Wiki page
https://wiki.sonic.net/wiki/.htaccess
but no joy. It also cites a "a cool tool to help me use htaccess"
but http://sonic.net/support/web_resources/htaccess/ gives me a 404.

Re: Redirecting web access requests

Posted: Tue May 22, 2018 12:04 pm
by joemuller
It sounds like the easiest solution for you would be to have ronksville.com use the same directory as your sonic.net/~ronks/ pages. You can change this in Member Tools under Hosting -> Web Sites / Domain Names -> Hosting -> Change Hosting Directory - you'll want to choose the "Use my base web directory" option. (see screenshot)
Image

No htaccess needed! :)

-- Joe

Re: Redirecting web access requests

Posted: Tue May 22, 2018 1:52 pm
by ronks
Yes, that did it; thanks! I did have to clear the browser cache, but otherwise no prob.

Re: Redirecting web access requests

Posted: Thu Jul 19, 2018 1:35 pm
by ronks
To follow up on this with a related question; I presently show
> Current hosting directory for ronksville.com:
> /home/WWW_pages/ronks/

Is that the directory where my robots.txt file should reside?
My guess is Yes, but I wanted to confirm.

Re: Redirecting web access requests

Posted: Thu Jul 19, 2018 2:44 pm
by joemuller
ronks wrote:To follow up on this with a related question; I presently show
> Current hosting directory for ronksville.com:
> /home/WWW_pages/ronks/

Is that the directory where my robots.txt file should reside?
My guess is Yes, but I wanted to confirm.
Yes. The robots.txt file should always be placed at the top-most (root) directory of the website.

-- Joe

Re: Redirecting web access requests

Posted: Thu Jul 19, 2018 3:13 pm
by ronks
OK, thanks!