Note: when saving the permalinks settings, WP asks me to update my .htaccess manually, since it is not writable – but I do think it is…
Well, you are wrong. π If WordPress can’t write to the file it isn’t writable. Computers don’t make that kind of mistake.
Untested, but I believe this is right. Well… it is close anyway. π
RewriteCond %{HTTP_HOST} !^rachelkollerup\.com
RewriteCond %{HTTP_HOST} ^blog\.rachelkollerup\.com
RewriteRule (.*) http://rachelkollerup.com/$1 [R=301, L]
Thread Starter
mpals
(@mpalsgaard)
Thanks for your answer. I’ve set the permissions to 777, so that’s why I thought the file would be writable (I’ve changed it back).
I tried adding the three lines you suggest, but this resulted in a 500 internal error – so I guess it’s not completely right?
My .htaccess looks like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
hmmm… mod_rewrite rules can be tricky. Make sure that code is after RewriteEngine On and before the everything else. Sorry, I am mostly guessing at this one. I don’t currently have any working subdomains that I can play with. I really need to create a few.
Thread Starter
mpals
(@mpalsgaard)
I think you are on to something though. I should have mentioned that the wp files are all in the /blog/ dir. It’s only the site url I’ve changed.
I think you are on to something though. I should have mentioned that the wp files are all in the /blog/ dir. It’s only the site url I’ve changed.
Ok. That is important. So you have the subdomain configured to point to the “/blog” directory, correct?
I believe that you will need to undo that subdomain, and then treat the installation like a subdirectory install.
Thread Starter
mpals
(@mpalsgaard)
Thanks for the link. I actually already followed that guide – or so I thought – I accidently also changed the subfolder’s index.php. (adding the sub-domain). Now it works π Thanks for your help.
I’ve installed a plugin to handle the redirect, which works fine. π