Wholesale Drop Ship Suppliers - Loan - Loan - Maschinenbau Verfahrenstechnik - Mobile Phones

PDA

View Full Version : www. & non-www. (fixing robots.text)


theultimatepublishing
Jul 30th 2007, 9:15 pm
When I entered my main url (with www.) (http://www.theultimatepublishing.com/blog), it gets redirected to a url (without www.) (http://theultimatepublishing.com/blog). What happened to my www.?

On some of my blog posts, such as this (http://www.theultimatepublishing.com/blog/adspypro-spying-on-ppc-affiliates).

When I clicked on my affiliate link (http://www.theultimatepublishing.com/blog/ultimateadspypro), (which I used adtrackz to cloak), the www. also disappears!

What happened? Is there a problem with my robots.text or .htaccess?

User-Agent: Googlebot
Disallow: blog/index.php
Disallow: blog/category/
Disallow: blog/feed/

User-agent: *
Disallow: blog/wp-
Disallow: blog/trackback/

Did I place my robots text in the wrong folder? I put in in the main folder & the /blog folder.

Did I mess up the file permissions of my robots text or .htaccess?

I would like redirect all the non-www. to www., how do I do that?

Please help, thank you so much.

explorer
Jul 31st 2007, 9:11 am
This is a .htaccess issue.

To achieve what you want to do, place the following in your .htaccess.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain\.com
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L]

theultimatepublishing
Jul 31st 2007, 12:51 pm
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain\.com
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L]


Thanks.

Do I place this .htaccess file in the main folder or the /blog folder or both?

maxbear
Aug 1st 2007, 1:35 pm
Are you using wordpress? If yes, get the Permalink Redirect plugin, will fix all the problems.

theultimatepublishing
Aug 1st 2007, 1:47 pm
Are you using wordpress? If yes, get the Permalink Redirect plugin, will fix all the problems.

Thanks, I just did that few hours ago. Works fine now.

trichnosis
Aug 6th 2007, 8:01 am
it's better to make a 301 redirect with the code which is given above.

dont waste your time with robots.txt