an easy solution might to delete the ./wp directory, and then
$ ln -sf ./blog wp;
then you have a blog dir and a filesystem link wp to ./blog,
so when apache calls wp it gets stuff out of ./blog.
Thread Starter
moshu
(@moshu)
Thanks, but I am afraid you will have to be more explicit – consider me totally illiterate in this matter.
And just in case you missed:
old address – mydomain.com/wp
new address – subdomain.mydomain.com/blog
Ah, yes, I didn’t notice the subdomain part. I’ll get back later.
Thread Starter
moshu
(@moshu)
Thanks, jwilliams.
Maybe in the meantime somebody can give me some detailed instructions 🙂
what is the absolute local path to your document root for domain.com,
and what is the absolute local path to your document root for subdomain.domain.com ?
Moshu,
I use this redirect rule in my .htaccess, it would redirect any request for the old address to the new. I don’t use it with a sub domain, but I have used a similar rule in the past to completely different domains and it worked well:
RewriteEngine On
RewriteBase /
RewriteRule ^wp/(.*)$ http://sub.example.com/$1 [R=301,L]
Just add all of that (or just the rule on the last line) to your .htaccess and give it ago. The above assumes the .htaccess will be in the root www directory. I’m not sure if it’s the best or not, but it works for me!
Good luck,
Michael.
Thread Starter
moshu
(@moshu)
/home/**myusername**/public_html/
and
/home/**myusername**/public_html/subdomain/
This should do it for you then moshu:
RewriteEngine On
RewriteBase /
RewriteRule ^wp/(.*)$ /*subdomain*/$1 [R=301,L]
Just change the *subdomain* to your intended subdomain and place the code (either all of it or the rewrite rule) into the .htaccess in your root (/home/*username*/public_html) directory or adjust the paths accordingly.
Cheers,
Michael.
Thread Starter
moshu
(@moshu)
Thanks, Michael, I’ll give it a try.