Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lylo

    (@lylo)

    jdembowski, thanks heaps for taking the time to look into this, I really do appreciate it. You have solved the problem! 🙂

    For the record, here’s how it was solved…

    Originally, my server was set up as follows.

    http://www.domain.com pointed to /var/www/domain.com/htdocs

    The WordPress blog data resided in /var/www/domain.com/htdocs/blog and the WordPress URL was set to http://www.domain.com/blog.

    To solve the problem, I first created a new blog directory:

    [htdocs]$ cp -R blog wordpress

    Next, I created the subdomain as a VirtualHost in Apache and pointed it to this new directory:

    <VirtualHost *:80>
        ServerAdmin admin@domain.com
        DocumentRoot "/var/www/domain.com/htdocs/wordpress"
        ServerName blog.domain.com
        ErrorLog "/var/www/domain.com/logs/error_log"
        CustomLog "/var/www/domain.com/logs/access_log" common
    </VirtualHost>

    In /var/www/domain.com/htdocs/wordpress I added the following .htaccess:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    I then added the following .htaccess' in the old blog directory,/var/www/domain.com/htdocs/wordpress`:

    RewriteEngine ON
    RewriteRule ^(.*)$ http://blog.domain.com/$1 [R=301,L]

    Finally, I restarted Apache and logged into WordPress and changed the URL to http://blog.domain.com and everything works! The blog is now accessible from http://blogs.domain.com and all the old URLs redirect permanently to this new subdomain. Awesome.

    To celebrate, I think I’ll write this up on my blog 🙂

    Thread Starter lylo

    (@lylo)

    jdembowski, thanks very much for your reply.

    I don’t actually have an old blog directory. My WordPress directory is /htdocs/blog, and WordPress originally had the blog URL configured to http://www.domain.com/blog.

    I then added the subdomain http://blog.domain.com and pointed it (using Apache) to the existing /htdocs/blog directory. I then changed the WordPress blog URL to http://blog.domain.com and everything worked fine with the new URLS — all the permalinks are now http://blog.domain.com/2007/06/article etc. However, the old permalink URLs (http://www.domain.com/blog/2006/ etc) no longer work — the Apache logs say:

    Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    
    Given this scenario should I do something like?

    RewriteEngine ON
    RewriteRule ^http://www.domain.com/blog/(.*)$ http://blog.domain.com/$1 [R=301,L]`

    Perhaps the problem is further compounded by my WordPress .htaccess file in the /htdocs/blog folder:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress

    I also have this problem – no way to switch the visual editor on after upgrading to 2.1. Could anyone enlighten me?

Viewing 3 replies - 1 through 3 (of 3 total)