Redirect WWW to NO WWW using .htaccess Submitted by CoolGoose on Tue, 02/02/2010 - 16:28 Inspired by here's how to do a simple redirect from the www version to the non www version of the website. RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] Technology: apache htaccess Add new comment Your name * E-mail * The content of this field is kept private and will not be shown publicly. Homepage Comment * More information about text formats Text format Filtered HTMLPlain text Filtered HTMLWeb page addresses and e-mail addresses turn into links automatically.Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>Lines and paragraphs break automatically.Plain textNo HTML tags allowed.Web page addresses and e-mail addresses turn into links automatically.Lines and paragraphs break automatically. Notify me when new comments are posted All comments Replies to my comment CAPTCHAThis question is for testing whether you are a human visitor and to prevent automated spam submissions. Math question * 1 + 1 = Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Add new comment