Hi, Here's the situation. We have apache installed on a Windows Server, and have sucessfully setup a WP blog as well as a static website. Wordpress2.5 has built in canonical URL's via PHP, and is working fine. Our problem is forcing the 301 on the rest of the website and it's subdirectories. I have tried forcing a 301 redirect for canonical URLS (change non-www urls to www) and with each attempt, the site either returns a 500 or works fine, but doesn't do the writing. Heres the code in the .htaccess ################################################## # CANONICAL HOSTNAME REDIRECT (non-www to www) # ################################################## RewriteEngine On RewriteBase / rewritecond %{http_host} ^mydomain\.com [NC] rewriterule ^(.*) http://www.mydomain.com/$1 [L, R=301] Code (markup): *Obviously I am replacing mydomain.com with.... my domain I'd appreciate any help with this as I've been scratching my head on it. I've got a feeling the problem lies in that this is apache running on windows. I've only ever run *nix servers + apache before, so Im not really sure what needs to be done different? Thanks
just checked with phpinfo() and mod_rewrite IS loaded.... however if I use this code in the .htaccess <IfModule mod_rewrite.c> ....... </IfModule> Code (markup): then I get a 500 error..... ?
nvm, figured it out. The rewrite rules only work if they are placed in the apache httpd.conf file.... ?