I was not sure where to ask this, but I want to setup my website at www.###.com/blog. So if anyone typed in www.###.com it would go to www.###.com/blog. Would this be just be a forward or not? If so I do not like this because i can not track reffering urls. I figured one of you would know.
you will want to do a 301 redirect from .com -> .com/blog. You can do this easily with .htaccess. Also, most web servers can be setup so that your root directory is /blog. Here is an htaccess guide: http://www.webconfs.com/how-to-redirect-a-webpage.php
I am using a GoDaddy hosting service and can not find the section where I can setup the root directory. If I have to do a 301 redirect I need to do it with PHP. Where would I place this code? an index.php file? <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); ?>
I think something like this would work. Make a blank text file, and name it .htaccess. Make sure there is no .txt at the end of it. Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} !^www.domain.com/blog/ [nc] rewriterule ^(.*)$ http://www.domain.com/blog/$1 [r=301,nc] Code (markup):
Also, this one may be better. Also upload the .htaccess file to your root web directory. Options +FollowSymlinks RewriteEngine on rewriteCond %{REQUEST_URI}!^/blog/ rewriteRule ^(.*)$ /blog/$1 [L,R=301] Code (markup):
I believe GoDaddy hosting provides a Cpanel. In the Cpanel click the ->Redirections links and in there just add the redirections you want .
There is not redirection. There is a 404 error redirections slot, but I tried that one and it does not work.