Loans - Debt Consolidation - Myspace Layouts - Loans - Expiring Domains

PDA

View Full Version : mod_rewrite redirect


ServerUnion
Apr 22nd 2005, 11:17 am
have a client forum that is placed in www.yourdomain.com/forums with nothing in the homepage and is not idexing. I use the following to append "www" the redirect to /forum


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.yourdomain.com\.net [NC]
RewriteRule ^(.*) http://www.yourdomain.com.net/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com\.net
RewriteRule (.*) http://www.yourdomain.com.net/forums/$1 [R=301,L]
ErrorDocument 404 /index.php
</IfModule>

Any suggests of a better way to do this? Would like to hear all of your thoughts on this matter.

Thanks for the help...