Skip to content

Instantly share code, notes, and snippets.

@hzlzh
Created November 23, 2011 02:37
Show Gist options
  • Save hzlzh/1387753 to your computer and use it in GitHub Desktop.
Save hzlzh/1387753 to your computer and use it in GitHub Desktop.
Htaccess file 301
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^tag=(.+) [NC]
RewriteRule blog/$ http://www.xxx.com/tag/%1/? [NC,L,R=301]
RewriteRule blog/bid/(.*)/(.*)$ http://www.xxx.com/$2 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.yyy.com [OR]
RewriteCond %{HTTP_HOST} ^yyy.com [NC]
RewriteRule ^(.*)$ http://www.xxx.com/ [L,R=301]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment