tìm địa điểm mua gạo mầm rẻ nhất tphcm

trung tâm học tiếng anh ở tân phú uy tín nhất

đại lýgạo sạchuy tín

tìm hiểu gạo nguyên cám là gì

tìm hiểu gạo lứt huyết rồng có tốt không

đại lý gạo hạt ngọc trời uy tín tại TPHCM

Redirect URL in htaccess for Joomla

 By default your Joomla website can be accessed with both www.yourdomain.com and www.yourdomain.com. Since Google penalizes duplicated content for some reasons, you should restrict the access to either www.example.com or example.com. Some links may be outside of your website scope and/or the search engines may have already indexed your website under both addresses. >

 URL redirect/rewrite Joomla site using the .htaccess file

Your primary .htaccess file is located in your public_html folder.

Redirecting to or from WWW

Part 1 - How do I redirect all links for www.yourdomain.com to yourdomain.com ? Create a 301 redirect forcing all http requests to use either www.yourdomain.com or yourdomain.com:

Example 1 - Redirect yourdomain.com to www.yourdomain.com:

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www.yourdomain.com$ [NC]

RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

Example 2 - Redirect www.yourdomain.com to example.com:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$

RewriteRule ^/?$ "http\:\/\/yourdomain\.com\/" [R=301,L]

Redirect your Joomla visitors to a new site

You have an old Joomla site that is accessible under olddomain.com and you have a new website that is accessible under newdomain.com. Copying the content of the old website to the new website is the first step - but what comes after that? You should do a 301 moved permanently redirect from the old domain to the new domain - which is easy and has some advantages:

  • Users will automatically be redirected to the new domain - you do not have to inform them.
  • Search engines will be redirected to the new domain and all related information will be moved to the new domain (but this might take some time).
  • Google's PageRank â„¢ will be transfered to the new domain, as well as other internal information that is being used to set the position of pages in the search engine result pages (serp's) - like TrustRank .

Example 1 - Redirect from olddomain.com to www.newdomain.com:

RewriteEngine On

RewriteCond %{HTTP_HOST} !olddomain.com$ [NC]

RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]

This is useful when you use www.domain.com as your new domain name (see also this article about redirecting www and non-www domains). If not - use the code of example 2.

Example 2 - Redirect from olddomain.com to newdomain.com:

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} !olddomain.com$ [NC]

RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]