Archive for the 'Apache' Category

Deny https from search engines indexing

Well, if you have such problem, let’s do the following:

  1. Create two files:
    1. robots.txt:
      User-agent: *
      Allow: /
    2. robots-https.txt:
      User-agent: *
      Disallow: /
  2. Now write in your .htaccess this:
    RewriteEngine on
    RewriteCond %{HTTPS} on
    RewriteRule ^robots\.txt$ robots-https.txt

That’s all :) Have a nice day.


Tags: , , , , , , ,

How to make HTTP Error 301 - Moved permanently Explained

Well, simply write in your .htaccess file the following:

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^site.com$
RewriteRule ^(.*)$ http://www.anothersite.com/$1 [R=301,L]


Tags: , , ,