Originally posted by darrylmg
View Post
I tried creating a CNAME record like this:
Code:
www.subdomain.example.com subdomain.example.com
Code:
www.example.com 99.99.99.99 subdomain.example.com 99.99.99.99 www.subdomain.example.com 99.99.99.99
Code:
RewriteCond %{HTTP_HOST} ^www.subdomain.example.com
RewriteRule ^(.*) http://subdomain.example.com [R=301,L]
a file called .htaccess (this is the one where I have added the rewrite stuff)
a folder called www
a folder called subdomain
a folder called cgi-bin
In the subdomain folder there is a standard wordpress .htaccess file to whoch I have added so now it looks like this:
Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.subdomain.example.com
RewriteRule ^(.*) http://subdomain.example.com [L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EDIT: added code tags to stop forum software mangling my post


Comment