Redirecting web access requests

Web hosting discussion, programming, and shared and dedicated servers.
6 posts Page 1 of 1
by ronks » Tue May 22, 2018 9:52 am
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.
by joemuller » Tue May 22, 2018 12:04 pm
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
I'm a proud employee of Sonic.net! :-)
by ronks » Tue May 22, 2018 1:52 pm
Yes, that did it; thanks! I did have to clear the browser cache, but otherwise no prob.
by ronks » Thu Jul 19, 2018 1:35 pm
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.
by joemuller » Thu Jul 19, 2018 2:44 pm
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
I'm a proud employee of Sonic.net! :-)
by ronks » Thu Jul 19, 2018 3:13 pm
OK, thanks!
6 posts Page 1 of 1

Who is online

In total there are 22 users online :: 1 registered, 0 hidden and 21 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: Bing [Bot] and 21 guests