.htaccess RewriteEngine On
I implemented an .htaccess Rewrite for whatit.be today and figured I would post it for my own reference and for anybody else who doesn’t read this shit. Anytime I setup a new website or even domain, this is one of the first things to be done.
.htaccess Rewrite (no www)
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^whatit.be$ [NC]
RewriteRule ^(.*)$ http://whatit.be/$1 [L,R=301]
.htaccess Rewrite (www)
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.whatit.be$ [NC]
RewriteRule ^(.*)$ http://www.whatit.be/$1
[L,R=301]
No related posts.
tags: .htaccess, development, reference
This entry was posted on Thursday, May 21st, 2009 at 4:59 pm and is filed under web. You can follow any responses to this entry through the comments feed. You can leave a response, or trackback from your own site.