Skip to content

Instantly share code, notes, and snippets.

@namncn
Last active December 9, 2022 18:15
Show Gist options
  • Save namncn/693e55113d6d12b780b695da633a4aa4 to your computer and use it in GitHub Desktop.
Save namncn/693e55113d6d12b780b695da633a4aa4 to your computer and use it in GitHub Desktop.
Hướng dẫn chuyển hướng (.htaccess Redirect 301) tên miền cũ sang tên miền mới
# Hướng dẫn tại: https://namncn.com/chua-phan-loai/huong-dan-chuyen-huong-htaccess-redirect-301-ten-mien-cu-sang-ten-mien-moi/
RewriteEngine On
RewriteCond %{HTTP_HOST} ^tenmiencu.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.tenmiencu.com$
RewriteRule ^(.*)$ https://tenmienmoi.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment