Just out of curiosity, I'm familiar with redirecting using the above mentioned code in htaccess, however I lose my stylesheet in wordpress. My existing htaccess looks like this:
Code:
php_value upload_max_filesize 50M
php_value post_max_size 50M
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
However when I change it to this:
Code:
php_value upload_max_filesize 50M
php_value post_max_size 50M
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
or this:
Code:
php_value upload_max_filesize 50M
php_value post_max_size 50M
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP_HOST} ^www\.markbolyard\.com [nc]
RewriteRule (.*) http://markbolyard.com/$1 [R=301,L]
That's where I have the problems. Do I have things in the wrong order? Perhaps I need to set something differently in my wordpress theme?
The first part of the code is to achieve the SE friendly URL re-writes, and the second of course, is to forward my domain to the www version.
My site displays fine without the redirect code to go to the www version, but as soon as I add it, just as I mentioned, the site appears to not be able to find the css file. I even viewed the source when I viewed my site this way, and all urls seem to point to the correct locations as far as the CSS and image files.
Thanks in advance for any suggestions.