Tag Archives: .htaccess

How to redirect the old domain to the new one?

A question that appears on move: How to redirect the old domain to the new one?

I have a blog, and can be read at http://blogvechi.com and decide that it’s time to move him, to do something new, to bring more of the written or any other reason, the address http: // blognou.com.

After you make sure everything is copied and installed in the new location, I noticed that my readers are still looking for the old address and the new one does not get anyone to read. All you have to do is to define the root htaccess file redirecting the old site.

This denotes that you are still old domain owner.

The few lines can help me get rid of this problem and other problems that result from such a move.

When you migrate a site from one domain to another, it is important not to break all ties that you were built to the old you. Proper forwarding of all pages on the old domain to the same location on the new field will ensure that our old domain will get to the right place. Without this redirection will have a loss of visitors and search engine rankings.

Suppose your web server using Apache for the purpose of this tutorial. If you have not made ​​changes to the structure of your site overall, and you simply moved the site in its current state, you can add the following lines to the file located in the old root domain htaccess .

<IfModule mod_rewrite.c>   
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www.olddomain.com$
  RewriteRule(.*)$http://www.newdomain.com/$1[R=301,L]
</IfModule>

Is it possible to create rules that will redirect URLs that follow a certain pattern to a new location. Since these rules involve complex regular expressions, they are not explained here. A professional SEO can help you to create these complex rules in a specific situation. Just make sure you use a 301 redirect for content moved. Any other type of redirection will not keep your search engine rankings (Google for example).

Mobile and Tablets sites

More of the people I know, started to complain that the browsers on smartphones and tablets do not have convenient sites with easy and accessible interface for this type of Internet user. For that, it seems that is required by the site administrator so dedicated to present a version specially created for these visitors. Server-side settings can implement a redirection of these visitors to a page dedicated to using the .htaccess file of that site. Continue reading Mobile and Tablets sites

Secure Your Site (.htaccess)

 Secure Your Site (.htaccess)

One way to prevent unwanted access of your site is using the file .htaccess

Reasons:
– Restrict access to a known hacker / bot from accessing your site
– Allowing only certain IP addresses to view your site (while in development, for example)
– Allow only trusted individuals in your site (if your users IPs remain the same, because it’s safer)
– Banning people from a particular country (or any location unknown) to access your site
– Ban people from your site
Continue reading Secure Your Site (.htaccess)