Has anyone gotten the url rewrite to work with forcing your domain to use www?
My .htaccess looks like this for the url rewrite
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
Please be more specific on what you have done and what fails and where, as Yii handles to perfection www.domain or domain. or even subdomai.domain. Maybe it is an issue on your server or on your development computer or…
first of all if you are running apache2 on linux check mod-rewirte in ls -l /etc/apache2/mods-enabled/ and cat /etc/apache2/mods-enabled/rewrite.load to be compiled and enabled
secondly , check your default site configuratoin here : /etc/apache2/sites-available/default for ModRewrite enablility. ( AllowOverride All ).
would this go before the yii specific configuration?
RewriteEngine on
#Force www
RewriteCond %{HTTP_HOST} ^yourdomain\.com
RewriteRule ^/(.*)$ http://www.yourdomain.com/$1 [R=301,L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php