Best way to redirect


#1

I would like it so that when people come to my main site, they automatically get redirected to something else. For example, they type in “www.example.com” but they actually get taken to “www.example.com/chicken”. Thanks.


#2

You can either go to Domains -> Manage Domains and edit that domain to use a different web directory, or Google for “Meta Refresh.”

There are also some .htaccess solutions as well, and you can probably do a search in this forum for 301 (that’s a redirect code).

-Scott


#3

Thanks Scott. Of every method you described, the only one that looked easy for a beginner like me was the web directory thing. I tried that and it broke the site. I changed the web directory from “/home/username/example.com” to “/home/username/example.com/chicken” . Even after waiting 15 minutes, both the main page and the “chicken” sub domain were inaccessible. Any more ideas?


#4

An .htaccess 301 is pretty simple to implement and from what I understand its preferred by the search engines (at least Google)

Just add a code line like this in the htaccess file at the root:

redirect 301 /index.php http://www.example.com/chicken

~
website building website building & dreamhost coupons
my obligatory dreamhost coupon


#5

If you Chicken site still has URL references to /chicken, then the rename directory will break it. Either fix the URL references, or use the 301 or Meta Refresh method.

-Scott


#6

Thanks guys. One small problem though. When i FTP in and look in my root, there is no .htaccess file. Is this something i have to create?


#7

You have to make sure you are able to view hidden files

are you logged in as sftp://yoururlloginforftp

well i use WS_FTP
some programs have it in the options, to allow the showing of hidden files and folders… because .filename files are hidden from regular connection


#8

I use FileZilla. I have forced hidden files to show up and i am seeing a few files that were previously not visible. However, none of them are .htaccess files.


#9

.htaccess isn’t there by default. It’s not necessary unless you need to do some tweaking, so you’ll need to create it.

-Scott


#10

Thanks all. I found the .htaccess, moved it to root and added your 301 suggestion and it works.