Oct
30
2009
30
2009
Uncategorized
301 Redirect for Apache
| Write to file called ‘.htaccess’. The file is named only as an extension.Hidden files must be viewable in operating system. mod_rewrite must be enabled | |
| Command | Description |
| Redirect 301 /oldpage.html http://www.ournewdomain.com/newpage.html | Redirect single file or directory to a newfile or directory on a different domain |
| RewriteEngine onRewriteCond %{HTTP_HOST} ^mysite\.com [NC]RewriteRule (.*) http://www.oursite.com/$1 [L,R=301] | Redirect http://oursite.com to http://www.oursite.com. Affects entire domain |
| Entire site:Redirect 301 / http://www.ournewdomain.com/Redirect permanent /old http://www.ournewdomain.com/new | Redirect entire domain to a new domainas either a 301 (recommended |

An article by admin




