Forum Moderators: phranque

Message Too Old, No Replies

WordPress .htaccess and non-www queries

         

kirkvan

9:59 pm on May 27, 2006 (gmt 0)

10+ Year Member



Aloha ~

On all of our domains we run the following mod_rewrite within our root .htaccess file to redirect accesses that don't include the ".www".

- - - - - - - - - -
RewriteEngine On
RewriteCond %{HTTP_HOST}!^www\.domain\.tld [NC]
RewriteRule ^(.*)$ [domain.tld...] [R=301]
- - - - - - - - - -

We would appreciate some help learning how to integrate, or add, the above into the standard WordPress mod_rewrite code:

- - - - - - - - - -
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>
- - - - - - - - - -

Thanks in advance for any assistance.

Best,
Kirk